Multi-turn Conversation and Prompts for Structured Parsing of Rare Disease R&D Documents

Rare disease R&D documents originate from diverse sources. These include clinical trial reports, gene sequencing data, drug synthesis records, medical

Data Characteristics

Rare disease R&D documents originate from diverse sources. These include clinical trial reports, gene sequencing data, drug synthesis records, medical imaging analysis reports, and patient medical records. Document update frequency is relatively low, typically aligning with clinical trial phases or new discovery releases. Document structures are complex, often containing extensive unstructured text, tables, graphs, and biomolecular structure diagrams. Fields and units involve standard medical terminology and measurement units, along with numerous gene loci (e.g., rsID), protein names, metabolic pathways, rare disease-specific classification codes (e.g., ORPHAcode), and drug mechanism descriptions. Data frequently includes abbreviations, jargon, and polysemous words, which challenge parsing accuracy.

Constraints on Multi-turn Conversation and Prompts

The complexity of rare disease R&D documents directly impacts multi-turn conversation efficiency and accuracy. Low update frequency requires knowledge base construction to process large volumes of historical data at once, ensuring long-term availability and avoiding frequent full updates. Diverse document structures and specialized fields demand prompt designs that precisely guide the model to identify and extract specific information. For example, the model must differentiate between adverse event rates and drug efficacy rates in clinical reports. The unique terminology and coding systems in rare diseases necessitate strong semantic matching capabilities for the model to understand user queries. It must link user expressions (e.g., "pathogenic mechanism of a certain gene mutation") to specialized terms in the knowledge base (e.g., SNP, pathway inhibition). Polysemous words and abbreviations in unstructured text require the dialogue system to perform context understanding, preventing misinterpretation due to ambiguity.

Configuration Settings

Configuration ItemSuggested ValueRationale
maxContext3000 TokensEnsures sufficient multi-turn conversation context to cover complex rare disease concepts.
Chunk size (Segment Length)500 charactersAccommodates lengthy clinical reports and improves recall granularity.
Similarity threshold (Similarity Threshold)0.78–0.85Balances precise matching of specialized terms with semantic generalization capabilities.
Rerank result count (Reranked Return Count)Top 8 entriesIncreases the breadth of relevant information the model acquires, addressing multi-source information queries.
temperature0.3–0.5Reduces randomness in generated content, enhancing the rigor of medical responses.
max_tokens1024 TokensEnsures the model can output complete and detailed explanations for rare diseases.

Common Mistakes

  • The dialogue displays "No relevant information found." This occurs when the Recall count (recall count) is too low or the Similarity threshold (similarity threshold) is too high, preventing the model from retrieving sufficient relevant document segments from the knowledge base.
  • The model misunderstands gene loci or protein names provided by the user, leading to inaccurate explanations. This happens when prompts do not explicitly instruct the model to focus on specific entity types, or when relevant fields in the knowledge base are not processed for entity extraction.
  • AI dialogue fails after a user uploads xlsx formatted clinical trial data, resulting in system errors or unresponsiveness. This is typically due to the UPLOAD_FILE_MAX_SIZE parameter limiting file size, or the file parsing service PARSE_FILE_TIMEOUT_SECONDS timing out.

Configuration Validation

  • Test whether the model can accurately recall and explain rare disease-specific queries for gene loci like rsID and ORPHAcode from the knowledge base.
  • Upload clinical trial reports containing complex tables and graphs. Verify that the model can correctly extract key information from table data and graph descriptions, and engage in multi-turn Q&A.
  • Simulate multi-turn conversations to assess the model's accuracy in understanding specialized medical abbreviations and polysemous words in different contextual environments, ensuring semantic drift does not occur.

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.