Data Characteristics
Pharmacovigilance data originates from drug development, clinical trials, and post-market surveillance. This includes regulatory documents, Standard Operating Procedures (SOPs), guidelines, laws, adverse event reporting templates, and audit rules. Documents are typically in PDF, Word, Excel (for data templates or lists), and Markdown formats.
Update frequency varies: laws and guidelines are relatively stable, with quarterly or annual revisions. Internal SOPs and institutional documents may update monthly or irregularly based on business needs or regulatory requirements.
Document structure typically includes strict chapter numbering, definitions, responsibilities, process descriptions, attachments, and revision histories. Fields and units include drug name, dosage, dosage form, indications, adverse reactions, reporting period, and audit status. Units like mg, ml, times/day, and % appear in descriptions.
Constraints on Knowledge Base Retrieval and Recall
The strict structure and high update frequency of pharmacovigilance documents impose specific requirements on knowledge base retrieval and recall.
First, documents contain many specialized terms and acronyms. The tokenizer and embedding model must accurately understand their semantics.
Second, regulatory documents often reference other regulations or internal SOPs, creating complex citation relationships. The knowledge base needs to handle cross-document relational retrieval.
Third, Excel-formatted reporting templates and list data often lose their table structure information during traditional text chunking, affecting retrieval accuracy.
Fourth, high update frequency means the knowledge base requires an efficient incremental update mechanism to ensure retrieval results are timely.
Finally, for numerical information like dosage and frequency, the system needs to support range queries or precise matching of specific values to avoid mis-recall based solely on text similarity.
Configuration Settings
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
Chunk size | 500–800 characters | Ensures each segment contains sufficient context while avoiding excessive length, which can lead to information redundancy and decreased embedding efficiency. |
Overlap Length | 50–100 characters | Maintains contextual continuity between adjacent segments, especially in process descriptions and definitions. |
Recall count | Top 5–8 entries | Considering the interconnectedness of regulatory documents, recalling more items helps cover potential references and related clauses. |
Similarity threshold | Calibrate by measurement | Requires adjustment based on the specific embedding model and data characteristics to ensure high-relevance recall and filter out noise. |
PARSE_FILE_TIMEOUT_SECONDS | 300 seconds | Prevents parsing timeouts when processing large PDF or Word documents. |
maxContext | 20000 characters | Provides sufficient recall context for large language models to understand complex regulatory clauses. |
Common Pitfalls
- Retrieval results contain many irrelevant clauses or definitions. This happens when the
Similarity threshold(similarity threshold) is set too low, leading to the recall of semantically unrelated paragraphs. - When a user queries a pharmacovigilance process, key steps or related attachment information are missing from the results. This occurs when Excel-formatted flowcharts or data templates are not effectively parsed and embedded, preventing their content from entering the knowledge base.
- Querying the latest revised regulatory document returns an older version. This indicates that the knowledge base's incremental update mechanism is not correctly configured or executed, failing to synchronize the latest document versions in a timely manner.
Verification Steps
- Perform test queries for key terms and processes within core regulatory documents to verify the accuracy and completeness of the returned results.
- Upload and parse a complex Excel file containing tables or diagrams. Check if the knowledge base correctly extracts table data and key information.
- Simulate a regulatory document update by uploading a new version. Then, query related content to verify that the knowledge base can recall the latest version promptly.
- For queries involving numerical ranges or specific units (e.g., "adverse event reporting period"), check if the recall results precisely match or cover the relevant numerical information.
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.