Citing and Tracing Sources for Rational Drug Use Quality Documents

Quality documents for rational drug use include drug inserts, clinical guidelines, pharmacopoeia standards, drug interaction databases, adverse event

Data Characteristics

Quality documents for rational drug use include drug inserts, clinical guidelines, pharmacopoeia standards, drug interaction databases, adverse event reports, and regulatory announcements. These data sources are diverse and update at varying frequencies. Drug inserts and pharmacopoeia standards are relatively stable. Clinical guidelines and drug interaction databases may update quarterly or annually. Adverse event reports and regulatory announcements publish irregularly.

Document structures vary. Drug inserts and guidelines are often structured or semi-structured text, containing fields like indications, dosage, contraindications, and precautions. Drug interaction databases are typically highly structured data, with fields including drug name, interaction level, clinical manifestation, and management advice. Units often involve milligrams (mg), grams (g), milliliters (ml), and units (U) for dosage, and hours (h) and days (d) for time.

Constraints on Source Citation and Traceability

The characteristics of rational drug use documents impose specific constraints on source citation and traceability. First, diverse and heterogeneous data complicate the management of citation links or identifiers. Each piece of information must trace back to its original source, whether a PDF page number, a database record ID, or a specific section of an online guideline.

Second, varying data update frequencies require the RAG system to identify and prioritize the latest authoritative information. This prevents citing outdated or retracted guidelines or drug inserts. For example, updates to adverse event reports can directly impact medication recommendations; the system must quickly reflect these changes. Furthermore, standardizing and validating units like dosage and time is crucial for ensuring citation accuracy, preventing potential errors from unit confusion.

Configuration Settings

Configuration ItemRecommended ValueRationale
Chunk size300–500 charactersRational drug use documents have high information density. Shorter segments improve precise matching and citation, avoiding irrelevant information.
Recall countTop 8–12 entriesGiven the breadth of information sources and potential subtle differences, increasing recall quantity helps cover relevant knowledge comprehensively.
Similarity threshold0.75–0.85Ensures high semantic relevance of recalled content, reducing the risk of inaccurate or irrelevant citations, especially for drug names and disease descriptions.
Rerank result countTop 5 entriesAfter ensuring high-relevance recall, re-ranking selects a few most relevant results, improving citation efficiency.
PARSE_FILE_TIMEOUT_SECONDS300 secondsSome clinical guidelines or pharmacopoeias can be large, requiring longer parsing times for complete processing and preventing data loss due to timeouts.
maxContext8192 tokenComplex medication plans or medical history analysis may require a longer context window to maintain continuous questioning and accurately identify citation points.

Common Pitfalls

  • Missing citation links or document page numbers in answers. The answer paragraphs lack specific source identifiers. This occurs when the system cannot parse and store structured citation metadata, or the frontend display configuration is not enabled.
  • Citing outdated drug inserts or clinical guidelines. The system's medication recommendations do not align with the latest published information. This happens when the knowledge base update mechanism fails to quickly synchronize with the latest authoritative data versions.
  • Model loses context during follow-up questions. The second question receives an irrelevant answer. This is due to a maxContext parameter set too low, preventing the system from retaining sufficient dialogue history.

Validation Steps

  • Ask questions about typical medication scenarios. Check if answers provide clear citation source identifiers, such as document titles, section names, or database record IDs.
  • Select drug inserts or clinical guidelines with significant updates within the last month. Import them into the knowledge base, then ask questions. Verify if the system's answers cite the latest version of the information.
  • Conduct multi-turn dialogue tests. After the first question, ask a follow-up question in the second turn that references a detail from the first answer. Observe if the system maintains contextual consistency.
  • Examine the imported drug interaction database in the knowledge base. Randomly select several records. Verify if the system accurately identifies and cites their field information, such as interaction level and management advice.

The values given are common starting points and should be measured 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.