Data Characteristics for This Category
High-value consumable pharmacovigilance data originates from medical institution reports, manufacturer collections, and regulatory body monitoring. This data updates relatively infrequently, typically aggregated quarterly or annually, with urgent events reported in real time. Document structures vary, including structured adverse event report forms, unstructured clinical follow-up records, surgical records, and patient feedback. Reports often contain fields such as consumable batch number, model, production date, implantation/use date, patient basic information, adverse event description, treatment measures, and outcomes. Units include millimeters, grams, milliliters, counts, and batches. Some data may include attachments like imaging reports and laboratory test results.
Constraints Imposed by These Characteristics on "Multi-Turn Conversations and Prompts"
The low update frequency of high-value consumable data means knowledge base updates do not need to be overly frequent. However, timely inclusion of new batches and products after market launch is essential. Diverse document structures require FastGPT's knowledge base to have robust heterogeneous data processing capabilities, effectively extracting key information from unstructured text. Precise identification of specific fields in reports (e.g., batch number, model) demands high accuracy from prompts, avoiding information omissions or errors due to fuzzy matching. The diversity of units requires the model to correctly understand and differentiate them in multi-turn conversations, preventing errors from unit conversion or misinterpretation. Additionally, since attachments may be involved, the model must guide users to review original reports or provide attachment summaries in its responses.
Configuration Settings
| Configuration Item | Recommended Value | Rationale for Recommendation |
|---|---|---|
maxContext | 2048 Tokens | Balances long text processing with model inference efficiency, ensuring multi-turn conversation context completeness. |
Chunk size | 500–800 characters | Accommodates longer texts such as adverse event descriptions, ensuring semantic integrity. |
Recall count | Top 8 entries | Increases the probability of recalling relevant information from the knowledge base, covering more potential leads. |
Similarity threshold | 0.75 | Improves the relevance of recalled results, reducing interference from irrelevant information. |
Rerank result count | Top 3 entries | Optimizes the knowledge snippets presented to the user, focusing on the most core content. |
QUERY_REWRITE_MODEL | gpt-3.5-turbo | Balances cost-effectiveness with query rewriting capability, enhancing complex query understanding. |
Three Common Mistakes
- The knowledge base debug preview works correctly, but API calls to the chat interface return a
knowledge_base_not_selectederror, indicating no knowledge base was selected. This occurs when thekb_idparameter is not correctly specified in the request body during the API call. - During a multi-turn conversation, the model fails to trace a specific consumable batch number. The model either cannot provide specific batch information or provides incorrect batch information. This happens when the batch number field in the original adverse event report has inconsistent formatting, or when the batch number was not effectively indexed as a key entity during knowledge base chunking.
- The conversation log shows a large number of duplicate or irrelevant knowledge snippets being cited. The model's answers are verbose and lack focus. This results from setting
Similarity thresholdtoo low, recalling too much low-relevance information, or settingRerank result counttoo high, failing to filter effectively.
How to Confirm Correct Configuration
- Use FastGPT's debugging interface to simulate at least 5 rounds of tracing conversations for specific high-value consumable adverse events. Check if the model accurately identifies and cites key information such as consumable model and batch.
- Use FastGPT's API interface to write automated test scripts. For queries of varying complexity, verify that the knowledge snippets in the returned
contextfield are highly relevant to expectations, and check if thekb_idparameter is correctly applied. - Regularly review the model-generated conversation logs. Focus on the accuracy of key information extraction, such as adverse event descriptions and treatment processes. Compare these against original documents to assess the model's understanding of details like units and dates.
Note: The values provided are common starting points. Measure them against your 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-09-21.