What the data for this category looks like
This category is compatible with FastGPT 4.10.0 and later versions. Data sources include platform API call logs, session storage modules, and reporting data from model call chains. Updates follow a near-real-time aggregation schedule: summary slices are generated every 5 minutes, and detail logs are written immediately after a session ends. The document structure uses structured records. Each record includes fields such as session_id, user_id, invoke_time, model_name, input_token, output_token, context_rounds, and prompt_version. Units are as follows: session identifier string, user identifier string, milliseconds, model type name, count, count, turns, and version identifier string.
What constraints these characteristics impose on the multi-turn dialogue and prompt engineering link
Near-real-time aggregated data requires multi-turn dialogue context recall to bind to real-time link data of the current session. This prevents misalignment of usage statistics across sessions. The context_rounds field can be used to calibrate the number of context recall entries for multi-turn dialogue. This avoids inference failures caused by exceeding the model token limit. The prompt_version field requires that prompt configurations for multi-turn dialogue be associated with version identifiers. This ensures that prompt calls and usage statistics version fields for different turns match. Additionally, compliance tracing requirements in financial scenarios require that each turn of input and output in multi-turn dialogue be linked to the corresponding session usage record. Prompt parameter configurations must include session ID pass-through logic to ensure accurate data tracing.
How to set configurations
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
maxContextRounds | the first 3-5 turns | Matches the context_rounds field of usage statistics, avoids token consumption exceeding the model limit, and ensures context relevance for multi-turn dialogue |
promptVersionBind | automatically bind when a session is created | Aligns with the prompt_version field of usage statistics, ensuring that prompt calls for each dialogue turn match the version identifier of the statistical data |
sessionId Pass-through Switch | enabled | Ensures every record of multi-turn dialogue is linked to a unique session_id, complying with usage statistics data tracing requirements |
tokenThreshold | 80% of the model context window | Combines the input_token and output_token fields of usage statistics, preventing call failures caused by exceeding model limits |
promptSpaceRecognition | enable full-width/half-width space automatic normalization | Resolves statistical data deviations caused by inconsistent space formatting in prompts, and adapts to prompt recognition requirements for multi-turn dialogue |
statsPersistencePath | /data/fastgpt/stats (docker mount path) | Ensures usage statistics data is not lost after container restarts, matching the persistence requirements of dialogue logs |
The parameter values provided on this page are common starting points for configuration. Actual values are affected by material form, data volume, and business rules. Specific issues require case-by-case analysis. It is recommended to test on your own samples before finalizing settings.
Three common misconfigurations
- Phenomenon: Only a small number of context turns are displayed in multi-turn dialogue details, and historical session content cannot be associated. Cause: The
maxContextRoundsconfiguration value is too small, and thesessionId Pass-through Switchis not enabled. This causes usage statistics to fail to correctly bind context link data for the current session. - Phenomenon: Half-width/full-width spaces included in prompts cannot be correctly recognized, leading to model inference results that do not match expectations. Cause: The
promptSpaceRecognitionconfiguration is not enabled, and no normalization processing is performed for spaces in prompts. This affects the accuracy of prompt version matching for usage statistics. - Phenomenon: Historical session usage statistics data or dialogue logs are lost, and call records cannot be traced. Cause: The docker mount parameter for
statsPersistencePathis not configured. This causes data to be cleared after container restarts, and persistent storage is not implemented.
How to verify correct configuration
- Enter the platform's usage statistics panel, filter for a specified session ID, and verify that the number of context turns for multi-turn dialogue matches the value range set in the
maxContextRoundsconfiguration. - Manually input prompts with different space formats to initiate multi-turn dialogue, confirm that model output matches expected logic, and verify that space recognition configuration is effective.
- Restart the platform container, check that historical data is retained in the usage statistics panel, and confirm that persistence path configuration is correct.
- Initiate a cross-turn dialogue, verify that the
prompt_versionfield in session details matches the currently used prompt version.
Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-09-14.