Technical Documentation and API Q&A for Cloud Billing and Cost Accounting: Knowledge Base Retrieval and Recall

Typical data for cloud billing and cost accounting comes from cloud billing systems, tag data, order systems, and resource monitoring tools. Daily

What the data for this category looks like

Typical data for cloud billing and cost accounting comes from cloud billing systems, tag data, order systems, and resource monitoring tools. Daily produced documents include billing details, cost allocation tables, resource utilization reports, and optimization suggestion sheets. Data update frequency is usually daily or monthly. Most documents are multi-field structured tables, with fields such as resource ID, cost amount, tag key-value pairs, and allocation ratio. Units include basic metrics such as yuan, hour, and GB.

This category’s data has a fixed update cycle. The knowledge base must trigger incremental synchronization daily or monthly to prevent data lag from affecting cost accounting accuracy. Structured multi-field documents require the retrieval link to support multi-dimensional matching. It must associate fields such as resource ID and tags to accurately locate target cost items. Data volume grows as cloud resource scale expands. The number of documents retrieved per round must be controlled to avoid context overflow that causes abnormal large model output. The accuracy of cost-related data directly ties to business decisions. Retrieval results must exclude low-relevance historical or unrelated entries, to ensure recalled content aligns closely with current accounting needs.

Configuration Settings

Configuration ItemRecommended SettingRationale
similarity0.75–0.85Matches field relevance for cloud billing data, filters low-relevance non-target cost entries
limitTop 8 entriesControls the number of documents retrieved per round, adapts to the single-batch data volume of billing details, avoids context overflow
usingReRankEnabledPerforms secondary sorting on retrieved billing entries by cost relevance, prioritizes core cost items and optimization suggestions
datasetSearchUsingExtensionQueryEnabledAutomatically supplements associated query terms such as tags and resource types, adapts to multi-dimensional retrieval needs for cost accounting
searchModevector_searchPrioritizes vector retrieval for semantic matching of structured billing data, improves cross-field retrieval accuracy

Three Common Mistakes

  • Phenomenon: Retrieval results include redundant paragraph ID fields, causing the large model to output internal identification information. Cause: The metadata return configuration for retrieval results was not disabled, and internal paragraph identifiers were accidentally included in the large model context.
  • Phenomenon: The knowledge base can retrieve data, but no valid output is generated after passing it to the large model. Cause: datasetSearchUsingExtensionQuery was not enabled. Retrieval results only return original billing text, without supplementing associated information related to cost allocation. The large model cannot generate a complete explanation.
  • Phenomenon: Custom directory structure does not take effect. All uploaded billing documents are created under the root directory. Cause: The passed parent ID parameter does not match the collection level ID of the corresponding cost accounting knowledge base, or the parameter format does not meet system requirements.

How to Confirm the Configuration Is Correct

  • Review retrieval return fields to confirm redundant metadata such as internal paragraph IDs are not included.
  • Run a test query with the input "Current month's cloud server cost details", verify retrieved results include current month's billing entries and sorting follows cost priority.
  • Upload a test billing document, specify the parent ID, then check the directory structure to confirm the document is assigned to the correct level.
  • Confirm the current deployment version is FastGPT v4.17.0, verify the knowledge base query and large model linkage function operates normally.

The values listed above are common starting points, and should be evaluated against samples specific to the deployment environment.

Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-10-19.