Data Characteristics in this Category
DTP pharmacy data in pharmacovigilance primarily originates from patient feedback after medication, pharmacist professional judgment records, and safety information released by drug regulatory bodies. This data is mostly unstructured text, such as patient-described symptoms, pharmacist follow-up notes, and adverse reaction lists in drug inserts. The update frequency is high; patient feedback and pharmacist records are generated almost in real-time, while regulatory information has fixed release cycles. Document structures are diverse, potentially including free-text patient diaries, structured medication lists, and semi-structured adverse event report forms. Common fields and units include symptom descriptions (e.g., "dizziness," "nausea"), medication dosages (e.g., "10mg daily"), occurrence times (e.g., "2 hours after taking medication"), and qualitative descriptions of adverse reaction severity.
Constraints Imposed by These Characteristics on "Multi-turn Conversation and Prompts"
The highly unstructured and diverse nature of DTP pharmacy data requires multi-turn conversation systems to have robust natural language understanding capabilities to accurately capture key information from patient descriptions. A rapidly updating data stream means the knowledge base needs efficient real-time synchronization mechanisms to ensure that information cited in conversations is always current. The diversity of document structures poses a challenge for prompt design, requiring prompts to adapt to different data formats and extract core entities like drug names, adverse reactions, and dosages. Since patient descriptions may include colloquialisms and vague information, maxContext needs to be sufficiently large for the model to recall longer conversation histories and understand the patient's true intent. Additionally, the professional and sensitive nature of adverse reactions demands that prompts generate responses with rigor and safety, avoiding misleading information.
Configuration Settings
| Configuration Item | Suggested Value | Rationale for this Value |
|---|---|---|
maxContext | 4096 tokens | Accommodates the colloquial and information-dense nature of patient feedback in DTP scenarios, ensuring the model can understand longer conversation histories. |
Recall count (Recall Count) | 8 entries (items) | Improves the accuracy and comprehensiveness of extracting relevant adverse reaction information from unstructured knowledge bases. |
Similarity threshold (Similarity Threshold) | 0.78 | Ensures recalled knowledge snippets are highly relevant to patient descriptions, filtering out irrelevant or low-value information. |
Chunk size (Segment Length) | 500 characters (characters) | Balances the completeness of knowledge snippets with model processing efficiency, avoiding noise from overly long segments. |
Rerank result count (Reranked Return Count) | 3 entries (items) | Further refines the most relevant knowledge from initial recall, reducing the model's processing burden. |
temperature | 0.3 | Ensures the model maintains rigor and objectivity when generating responses, reducing hallucinations and uncertain expressions. |
Three Common Mistakes
- During multi-turn conversations, when a user mentions a drug name, the system fails to accurately link it to detailed adverse reaction information for that drug in the knowledge base. This occurs because the knowledge base indexing granularity is too coarse, failing to establish fine-grained associations between drug names and specific adverse event instances.
- During the conversation, the model misinterprets patient-described symptoms, leading to warning information that does not match the actual situation. This usually happens when the prompt does not sufficiently emphasize entity recognition and standardized processing of symptom descriptions.
- Testing in the preview interface works normally, but in actual use, some patient feedback cannot be processed effectively, showing a "request payload too large" error. This is typically due to parameters like
maxContextorUPLOAD_FILE_MAX_SIZEbeing set too low in the production environment, unable to handle high concurrency or long text input.
How to Confirm Correct Configuration
- Select typical patient medication feedback cases and conduct multi-turn conversation tests in the FastGPT application. Observe whether the model can accurately identify drug names, adverse reactions, and medication details.
- Simulate adverse reaction reporting scenarios of varying severity. Verify if the system can recall and integrate associated drug warning information and generate professional risk alerts.
- Check log outputs to confirm that
Recall count(Recall Count) andRerank result count(Reranked Return Count) are effective as expected in actual conversations and that no truncation occurs due to context length limitations.
The values provided are common starting points and should be measured 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-09-21.