Data Characteristics
Telemedicine pharmacovigilance data primarily comes from patient online consultations, electronic medical record systems, physiological indicators uploaded from wearable devices, and self-reported adverse event information. This data often mixes unstructured text, such as doctor-patient dialogue records and patient diaries, with structured data, such as medication records and laboratory test results. Data updates frequently; patient reports can occur in real-time, while doctor diagnoses and medication adjustments typically follow consultations. Document structures vary, including free-text descriptions of symptoms, drug names, dosages, frequencies, and durations. Physiological indicators may include heart rate, blood pressure, and blood glucose, usually in international standard units, but patient self-reports might use colloquial or non-standard descriptions.
Constraints on Tool Calling and Plugins
The diverse and unstructured nature of data in telemedicine places higher demands on the accuracy of tool calling and plugins. Patients' colloquial descriptions require robust natural language understanding to standardize them and effectively trigger subsequent tools. High-frequency data updates mean tools must support real-time or near real-time data ingestion and processing to ensure timely pharmacovigilance. Diverse document structures require tools with flexible data parsing capabilities to extract key information from various text formats. For example, tools must identify drug_name and adverse_event from patient chat records and pass them as parameters to a drug interaction query tool. Inconsistent fields and units, especially non-standard expressions in patient self-reports, increase the complexity of data preprocessing before tool calls, requiring additional correction or mapping logic.
Configuration Settings
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
max_tokens | 2048 | Ensures the large language model can process longer patient dialogue records and medical summaries, preventing information truncation. |
temperature | 0.3 | Reduces the randomness of the large language model's output, enhancing the accuracy and repeatability of pharmacovigilance information extraction. |
tool_selection_strategy | auto | Allows the model to intelligently select appropriate pharmacovigilance tools based on the current context, such as adverse event queries or drug interaction analysis. |
parse_timeout_seconds | 60 seconds | Accommodates the complexity of telemedicine data, providing sufficient time for document parsing and entity extraction, preventing data loss due to timeouts. |
max_retries | 3 times | Improves the stability of tool calls, especially during fluctuations in external API services, reducing failures caused by transient network issues. |
response_format | json_object | Standardizes the structure of tool return results, facilitating automated processing and integration by subsequent systems, such as parsing the drug_interaction_level field. |
Common Pitfalls
- A
Connection Erroroccurs during tool calls, indicating unstable remote API services or network policies restricting FastGPT's connection to external tools. - The model makes concurrent or incorrect tool selections. This manifests as the model attempting to call multiple incompatible tools simultaneously, or selecting a tool unsuitable for the current task. This happens when tool descriptions are not precise enough, making it difficult for the model to differentiate applicable scenarios.
- When reading content from patient-uploaded documents, the AI's response cannot cite specific information from the document. The AI's responses are generic or state that no relevant information was found. This occurs because the document content was not correctly parsed and vectorized, leading to a failure to retrieve relevant context during the recall phase.
Verification Steps
- Simulate a patient-AI assistant dialogue to confirm the model correctly identifies drug names and adverse event descriptions based on the conversation content and successfully calls pharmacovigilance tools.
- Examine tool call logs to confirm the presence of the
tool_call_idfield and that each call returns the expected structured data, such asadverse_event_severityordrug_interaction_severity. - Conduct multi-turn dialogue tests to observe the model's tool selection accuracy in different scenarios, ensuring no unnecessary concurrent calls, and evaluate by comparing tool descriptions with actual call results.
- Upload patient reports containing complex medical terminology or non-standard descriptions. Verify the AI accurately extracts key information and passes it as parameters to the tool, then check if the tool's return results match expectations.
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.