Data Characteristics in This Category
Real-World Evidence (RWE) quality documentation data originates from various records generated in clinical practice. Examples include Electronic Health Records (EHR), medical insurance claims databases, disease registries, and patient-reported outcomes (PRO). This data is typically unstructured or semi-structured text. It includes clinical diagnoses, treatment plans, medication records, follow-up results, and adverse event reports. Data update frequency depends on the source; EHR data may update in real time, while medical insurance claims data usually aggregates quarterly or annually.
Document structure is complex. It may contain a mix of medical terminology, abbreviations, free-text descriptions, and structured fields. Field names may vary. For example, "patient ID" might appear as patient_id or medical_record_number in different systems. Units can also differ, such as dosage units mg, g, or IU.
Constraints Imposed by These Characteristics on "Multi-turn Conversations and Prompts"
RWE quality documentation data characteristics impose specific requirements on multi-turn conversation and prompt design. The prevalence of unstructured and semi-structured text means large language models need stronger generalization capabilities to understand context and extract key information.
Medical terminology and abbreviations require prompt designs to consider terminology standardization or provide sufficient contextual explanations to avoid ambiguity. Varying update frequencies from multiple data sources mean the system must reference the latest or time-specific data during multi-turn conversations. This can be achieved by explicitly limiting time in prompts or implementing version control during retrieval.
Inconsistent field names and units require prompts to guide the model in identifying and unifying this information, or to standardize it during preprocessing. This ensures accuracy and comparability of conversation results. For example, when a user asks about "the daily dose of a certain drug," the system needs to understand and convert dosage unit differences across various documents.
Configuration Settings
| Configuration Item | Recommended Value | Rationale for This Value |
|---|---|---|
maxContext | 2000 characters | Balances context length and computational cost, ensuring inclusion of key medical terms and patient record details. |
Chunk size (Segment Length) | 500 characters | Adapts to the average paragraph length in RWE documents, preventing the splitting of critical information blocks. |
Recall count (Retrieval Count) | 10 items | Covers potentially dispersed relevant information from multiple sources, improving retrieval accuracy. |
Similarity threshold (Similarity Threshold) | 0.75 | Filters out irrelevant document segments, reducing noise impact on conversation quality. |
Rerank result count (Reranked Return Count) | 5 items | Selects the most relevant segments from retrieval results, enhancing accuracy and coherence in multi-turn conversations. |
History Message Limit | 5 turns | Maintains conversational coherence while preventing context drift caused by excessively long historical information. |
Three Common Mistakes
- Conversation results lack critical medical details or cite inaccuracies. This happens when prompts do not explicitly ask the model to extract specific types of medical entities or lack contextual explanations for specialized terminology.
- In multi-turn conversations, the model fails to correctly understand user follow-up questions about historical information. This occurs because the
History Message Limitconfiguration is too low, leading to the loss of information from earlier conversation turns. - The AI conversation component returns a
finish_reasonfield indicatinglength. This manifests as incomplete or truncated answers. This is because themaxContextparameter is set too small, unable to accommodate the full RWE document context.
How to Confirm Proper Configuration
- Validate the extraction accuracy of key medical information in conversations against a series of test cases. These cases should include complex medical terminology and multi-source data queries, such as specific drug dosages or adverse event types.
- Check the system's ability to understand and reference user historical questions in multi-turn conversations. This is especially important when users follow up on specific patients or research data mentioned in previous turns; verify that system responses maintain contextual coherence.
- Evaluate whether the system can provide consistent and correct answers when processing queries with inconsistent field names or units. For example, query "the numerical range of a certain biomarker" and check if its units are consistent.
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.