Multiturn Conversation and Prompts for Dermatology Protocols

Dermatology protocols and SOP documents primarily originate from internal hospital regulations, national health commission and drug administration

Data Characteristics

Dermatology protocols and SOP documents primarily originate from internal hospital regulations, national health commission and drug administration guidelines, drug usage specifications, and medical device operation manuals. These documents are updated quarterly or annually. They are predominantly in PDF format, containing numerous tables, images, and flowcharts. The text focuses on specialized terminology, dosage units (e.g., mg/kg), operational steps (e.g., "clean the affected area first, then apply ointment"), contraindications, and adverse reactions. Common fields include disease codes (e.g., ICD-10 codes), generic drug names, batch numbers, manufacturers, and expiration dates.

Constraints on Multiturn Conversation and Prompts

Dermatology protocol documents are dense with specialized terminology and abbreviations. This requires high-precision entity recognition in multiturn conversations to avoid biased answers. Information in tables and flowcharts needs effective parsing and integration into text vectors by the RAG process to support accurate question answering, such as drug dosage queries or treatment pathway guidance. The update frequency necessitates a version-controlled synchronization mechanism for the vector database to ensure the latest protocols are retrieved. In multiturn conversations, users may frequently ask about specific operational details or drug comparisons. The system must maintain context and perform logical reasoning to avoid redundant or contradictory information. Precise recall of structured information like disease codes and drug batch numbers places higher demands on prompt construction and retrieval strategies.

Configuration Guidelines

Configuration ItemRecommended ValueRationale
Chunk size (Chunk Size)500–800 charactersDermatology SOP documents often contain multiple steps or details. This length helps maintain contextual completeness and prevents critical information from being truncated.
Chunk Overlap Length (Chunk Overlap)100–150 charactersEnsures sufficient overlap between chunks, improving continuity for cross-chunk information retrieval, especially when processing procedural steps.
Recall count (Recall Count)5–8 itemsGiven the complexity and specialization of protocol documents, increasing the recall count covers more potentially relevant information, improving answer accuracy.
Similarity threshold (Similarity Threshold)0.75–0.85Dermatology terminology requires high precision. Setting a higher threshold effectively filters out irrelevant or semantically ambiguous results, focusing on core protocol content.
Rerank result count (Reranked Return Count)3–5 itemsIn multiturn conversations, re-ranking recalled results ensures the most relevant items are displayed first, optimizing user experience.
maxContext2000–3000 TokensAccommodates context accumulation in multiturn conversations, ensuring the model can process longer dialogue histories and recalled content.

Common Pitfalls

  • Slow initial response and delayed first token output: This typically occurs due to model loading or cold start, especially with locally deployed models like bge, which require time for resource initialization.
  • Logical errors or inconsistencies in multiturn conversations: This results from improper context management, where the model fails to integrate historical dialogue effectively, or RAG recall content has insufficient relevance to the current turn's question.
  • 500 error when importing PDF documents containing tables or flowcharts: This may indicate an internal error in the document parser when handling complex layouts or non-text elements, failing to extract text content correctly.

Verification Steps

  • Import a dermatology SOP document containing complex tables and flowcharts. Check logs for a successful parsing message. Confirm if the PARSE_FILE_TIMEOUT_SECONDS parameter is appropriately set.
  • Ask a series of multiturn questions about a specific disease's treatment pathway. Observe if the model accurately cites steps, drug dosages, and precautions from the document. Check if the maxContext parameter is sufficient to maintain dialogue coherence.
  • Randomly select over 10 question-answer pairs containing specialized terminology. Test answer accuracy and compare the Similarity threshold (Similarity Threshold) of recalled results with actual answer quality to evaluate the effectiveness of the retrieval strategy.

The values provided 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.