What this category of data looks like
This category of data typically originates from cloud billing systems, tag data, order systems, and resource monitoring tools. It generates four standard document types on a daily or monthly basis: billing details, cost allocation tables, resource utilization reports, and optimization suggestion sheets. Each single document includes fields such as resource ID, billing item, amount, tag attribution, and utilization rate. Supported units include yuan, hours, GB, and others. The core connection maps tags to their corresponding resource consumption.
Constraints on context and token handling
Billing details and cost allocation tables have tightly linked fields. Context recall must match precise fields such as tags and billing items. This raises requirements for recall accuracy. Daily updated billing data has strong timeliness. Control the context refresh frequency to avoid referencing outdated information. Optimization suggestion sheets and resource utilization reports have large differences in content length. Adapt context fragments of varying lengths. For abnormal expense troubleshooting scenarios, multiple related documents must be recalled. This easily exceeds token limits. Strictly control the total context length and per-fragment usage. In some scenarios, custom context is passed directly via API. Ensure the configured maxContext fits the length of the passed custom content.
How to set configurations
This document applies to FastGPT v4.17.0.
| Configuration Item | Recommended Setting | Rationale |
|---|---|---|
maxContext | 8000–12000 token | Fits the total length of multiple billing details and allocation tables, avoiding exceeding the context limits of general large models |
| Number of documents recalled per single call | Top 6–8 entries | Matches the average number of associated documents per batch in cloud billing scenarios. Balances recall accuracy and token usage |
quoteMaxToken | 1500–2000 token per quote | Limits the token usage of a single document fragment. Prevents a single reference from exceeding the allocated context quota |
| Context refresh interval | Once per day | Matches the daily update frequency of cloud billing data. Ensures context references the latest billing and allocation data |
| Context recall threshold | Calibrated via actual testing | Must fit the matching requirements for precise fields such as tags and billing items. Avoids recalling irrelevant resource data |
Three common misconfigurations
- The symptom is that the number of context references displayed on the page does not match the number passed to the actual model. For example, the page shows 30 entries but 310 are actually passed. The cause is a mismatch between the configured recall upper limit and the front-end display truncation logic. This leads to inconsistent front-end display and actual call parameters.
- The symptom is that document fragments referenced in the context do not render Markdown formatting correctly. Only raw separators and markup text are displayed. The cause is that the format parsing configuration for document fragments is not enabled. This leaves Markdown tags as plain text.
- The symptom is that long text billing detail fragments are excessively truncated. Key billing item and tag information is lost. The cause is that a reasonable
quoteMaxTokenlimit is not set for long documents, or the automatic truncation logic is not enabled.
How to confirm correct configuration
- View model call logs. Check whether the number of passed context documents matches the configured number of documents recalled per single call.
- Test the call interface. Verify that returned context fragments correctly render Markdown formats such as tables and lists.
- Calculate the token consumption of a single billing detail document. Confirm it does not exceed the preset
quoteMaxTokenvalue. - Check the context refresh interval in system settings. Confirm it matches the update frequency of cloud billing data.
The values provided are common starting points. They should be evaluated against the reader's own samples.
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.