Data Characteristics
Patient assistance program data originates from pharmaceutical companies' CRM systems, patient registration forms, project management platforms, and feedback from partner pharmacies. Data update frequency varies by project. Updates are more frequent during new drug launches or policy changes, and quarterly or semi-annually during regular operations. Document structures are primarily structured data, such as CSV, Excel spreadsheets, or database records. These include anonymized patient basic information, disease diagnoses, medication records, assistance plan types, assistance cycles, drug batch numbers, pharmacy information, and project progress. Fields like drug batch number, assistance amount, and dosage have clear units. Some unstructured data may include patient feedback and pharmacist recommendations.
Constraints Imposed by These Characteristics on Multi-turn Conversations and Prompts
The highly structured and sensitive nature of patient assistance data demands strict accuracy and security in multi-turn conversations. When project policies update, the knowledge base must synchronize quickly. Failure to do so can lead to the AI providing outdated or incorrect assistance information. Specific numerical values in multi-turn conversations, such as drug batch numbers and assistance amounts, require the AI to precisely understand and generate numerical information, avoiding vague responses. Unstructured text, like patient feedback, requires stronger semantic understanding to extract key information. Data sensitivity also mandates strict control over output content in prompt design to prevent personal privacy leakage and ensure all information complies with regulations. The conversational system must identify and process specific patient inquiries about medications, program progress, and pharmacy locations, and accurately ask follow-up questions based on context.
Configuration Strategy
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
maxContext | 8 | Ensures context covers multiple patient questions and follow-ups while preventing excessively long contexts from diluting core information. |
Chunk size | 500 characters | Patient assistance documents often contain specific terms and details. Shorter segments facilitate precise matching and retrieval. |
Recall count | Top 5 entries | Combined with segment length, retrieving the top 5 items covers sufficient relevant information and reduces interference from irrelevant information. |
Similarity threshold | 0.75–0.85 | Patient inquiries often involve specific values and terms. A higher similarity threshold helps retrieve the most precise matches. |
Rerank result count | 3 entries | After retrieving a higher number of items, re-ranking selects the top 3 most relevant pieces of information to improve the quality of the final answer. |
SYSTEM_PROMPT | Calibrate by testing | Clearly guides the AI to focus on patient assistance policies, drug information, and project procedures, emphasizing information accuracy and compliance. |
Common Pitfalls
- The large model returns an empty value or an error, and the frontend displays a blank screen. This occurs when the conversation node lacks a unified mechanism for handling large model response exceptions, with no fallback replies or error messages configured.
- After deleting conversation records, they still appear in the interface. This happens when the frontend cache is not updated promptly, or the backend deletion operation is not correctly synchronized across all storage layers.
- After enabling "You might also ask," no related questions are provided at the end of the conversation. This could be because the knowledge base retrieval results are insufficient to generate meaningful recommended questions, or the recommended question generation logic is not correctly triggered.
How to Verify the Configuration
- Conduct multi-turn conversation tests for typical patient inquiries to check the AI's accuracy, completeness, and compliance.
- Simulate project policy updates. After updating the knowledge base, test whether the AI immediately provides the latest information.
- Test inquiries containing sensitive information to verify that the AI strictly adheres to privacy protection principles and does not disclose any personal data.
- Check the user interface feedback when the large model returns an empty value or an error, ensuring friendly error messages or fallback replies are displayed.
Note: The values provided are common starting points and should be measured against specific 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.