TriMediQ: Interactive Medical QA Framework
- TriMediQ is a triplet-structured framework for interactive medical QA that converts patient responses into structured clinical knowledge graphs.
- It integrates a frozen expert LLM with a trainable projection module, enabling multi-hop reasoning and efficient diagnosis in multi-turn consultations.
- Empirical evaluations demonstrate up to a 10.4% improvement in accuracy on benchmarks, underscoring the benefits of explicit graph-based clinical reasoning.
TriMediQ is a triplet-structured framework for interactive medical question answering that addresses a central limitation of LLM-based clinical dialogue systems: strong performance on static or single-turn benchmarks does not transfer cleanly to iterative consultations in which clinically relevant facts are dispersed across turns and weakly linked in raw dialogue logs. The framework converts patient responses into clinically relevant triplets, incrementally integrates them into a knowledge graph, and uses a trainable projection module to inject graph-structured information into a frozen expert LLM for multi-hop reasoning. In reported experiments on iMedQA and iCRAFT-MD, this design yields consistent gains over baselines, including up to improvement in accuracy on iMedQA (Meng et al., 3 Oct 2025).
1. Clinical motivation and problem formulation
TriMediQ is situated in the setting of interactive diagnosis rather than static QA. In this setting, an expert system does not answer from a fully specified case description; it must gather information turn by turn, decide whether additional questioning is necessary, and then produce a diagnosis from a multiple-choice question (MCQ). The motivating claim is that raw dialogue logs are an unfavorable substrate for reliable reasoning because clinical facts appear in sentences without explicit relational structure, which degrades LLM reliability in multi-turn settings (Meng et al., 3 Oct 2025).
The framework is explicitly presented as a response to the limitations of MEDIQ. MEDIQ recasts diagnosis as an interactive dialogue between a patient and an expert system, but TriMediQ departs from it by replacing reasoning over raw dialogue with reasoning over an incrementally constructed triplet-based clinical knowledge graph. This architectural shift makes relation structure first-class: symptoms, history items, findings, and durations are represented as entities and labeled edges rather than as loosely connected tokens in a conversational transcript (Meng et al., 3 Oct 2025).
A broader context exists in medical AI for structured interaction and knowledge-grounded inference. Earlier AI triage systems combined NLP extraction, ontology and knowledge-graph construction, adaptive questioning, and recommendation generation in deployed telemedicine workflows (Marchiori et al., 2020). TriMediQ occupies a narrower but more structurally explicit niche: interactive medical QA with frozen LLMs, triplet extraction, and KG-guided multi-hop reasoning (Meng et al., 3 Oct 2025).
2. Dialogue protocol and triplet extraction
TriMediQ maintains two agents. The patient system receives a full patient record and the expert’s question, then returns strictly verifiable atomic fact responses. The expert system receives the MCQ, the accumulated structured knowledge derived from patient answers, and must decide whether to diagnose or request further information. This separation is operationally important because the patient-side output is constrained to atomic facts, which the downstream triplet generator can transform into a structured representation with reduced ambiguity (Meng et al., 3 Oct 2025).
At each dialogue turn, a frozen triplet generator processes the latest patient response together with already extracted triplets. The extraction procedure uses prompt engineering designed to enforce factuality and faithfulness to the record. Its output is a set of atomic UMLS-style triplets per utterance, such as and . Each triplet follows a fixed schema with medical relations including Has_Symptom, History_Of, and Duration. To avoid redundancy, newly generated triplets are checked against previous extractions; at most three triplets are extracted per turn; and all triplets are validated for ontological compatibility and factual verifiability (Meng et al., 3 Oct 2025).
This extraction design clarifies an important point about TriMediQ. The framework does not treat triplets as a purely stylistic summary of dialogue. They are intended to be verifiable, schema-constrained, and incrementally compositional. A plausible implication is that the triplet layer functions as a bottleneck on hallucination propagation: only structured facts that meet the prompt and ontology constraints are admitted into the knowledge graph. The paper’s phrasing is more conservative, describing the approach as mitigating hallucination and reasoning errors by grounding all integrated knowledge in verifiable, atomic patient facts (Meng et al., 3 Oct 2025).
3. Knowledge graph representation and prefix projection
Newly extracted triplets are incrementally added to a patient-specific knowledge graph whose nodes are clinical entities and whose edges are labeled medical relations. The graph is formalized as a directed graph,
with denoting entities and denoting semantic relations. The paper identifies the resulting representation as the substrate for multi-hop reasoning: clinical facts from different turns become explicitly linked rather than remaining distributed across dialogue tokens (Meng et al., 3 Oct 2025).
The KG is integrated into the frozen expert LLM through a trainable projection module composed of a graph encoder and a projector. Node and edge representations are initialized with SentenceBert embeddings. The graph encoder may be a GCN or a GAT, producing contextualized node embeddings for each . The graph-level representation is then obtained by mean pooling,
This pooled vector is passed through an MLP with SiLU activation and reshaped into a prefix matrix,
where 0 is the hidden size of the expert model and 1 is the prefix length (Meng et al., 3 Oct 2025).
The prefix 2 is concatenated with the MCQ prompt embeddings at the input layer of the frozen expert LLM. This is the framework’s main integration mechanism: the LLM itself remains unchanged, while the KG-derived prefix conditions its reasoning. The paper frames this as a way to align structured graph semantics with the expert model’s decision space without fine-tuning the full LLM (Meng et al., 3 Oct 2025).
4. Training regime and inference dynamics
TriMediQ operates in two stages. In Stage 1, all patient and expert LLM parameters are frozen, and only the projection module—the graph encoder plus projector—is trained. The objective is cross-entropy loss over MCQ answer choices, using the triplet-based KG representation together with the MCQ prompt as input. The stated goal is to align the knowledge graph semantics with the expert model’s answer distribution while leaving the base LLM parameters untouched (Meng et al., 3 Oct 2025).
In Stage 2, the trained projection module is used during interactive inference. After each new patient response, the frozen triplet generator extracts up to three new triplets, the KG is updated, the graph is re-encoded, and the resulting prefix is injected into the expert LLM. The expert then decides whether sufficient evidence has been accumulated for diagnosis or whether another question should be asked (Meng et al., 3 Oct 2025).
The framework’s claim to multi-hop reasoning follows from this loop. By continually accumulating structured evidence across turns, the system can connect early and late facts through shared entities and relations. The paper contrasts this with flat token-based prompting, which it characterizes as limited for traversing long-range dependencies across interaction history. A further operational implication is efficiency in deployment: because only the projection module is trainable, the system preserves a frozen-LLM regime rather than requiring full-model adaptation (Meng et al., 3 Oct 2025).
5. Empirical evaluation
TriMediQ is evaluated on two interactive QA benchmarks. iMedQA is reformulated from MedQA and contains 10,178 training cases and 1,273 test cases. iCRAFT-MD is a dermatology interactive dataset with 140 test cases and no training split. The reported baselines are MEDIQ, Instruction Prompt (IP), Projector Training (PT), and Projection Fine-Tuning (PGT), with PGT corresponding to the full TriMediQ configuration using graph encoding (Meng et al., 3 Oct 2025).
Across both datasets and multiple model scales, TriMediQ consistently improves over MEDIQ. The paper reports the following benchmark-level gains:
| Model | iCRAFT-MD gain | iMedQA gain |
|---|---|---|
| Llama-3-8B | +8.2 | +8.3 |
| DeepSeek-14B | +6.2 | +5.0 |
| Llama-3-70B | +4.2 | +10.4 |
| Qwen-2.5-72B | +5.7 | +9.9 |
These gains correspond to concrete score changes rather than isolated wins. On iMedQA, for example, Llama-3-70B rises from 3 under MEDIQ to 4 under TriMediQ, and Qwen-2.5-72B rises from 5 to 6. On iCRAFT-MD, Llama-3-8B rises from 7 to 8, and Qwen-2.5-72B rises from 9 to 0 (Meng et al., 3 Oct 2025).
The ablation results are as important as the headline numbers. Simply appending triplets to the prompt (IP) is weaker than projecting encoded graph structure (PGT). Using a graph encoder in PGT outperforms simple MLP projection of pooled triplet vectors in PT. The paper interprets this as evidence that explicit relational encoding—not merely adding structured strings to the context window—is responsible for the gain. It also reports that TriMediQ’s advantage over MEDIQ grows as dialogue progresses, indicating improved integration of accumulating evidence across turns (Meng et al., 3 Oct 2025).
6. Conceptual significance, related triplet methods, and limitations of interpretation
TriMediQ belongs to a broader movement toward structured triplet representations in medical AI, but its target problem is distinct. MedTri converts radiology reports into unified triplets of the form
1
to improve medical vision-language pretraining (Chu et al., 25 Feb 2026). MedTrim uses meta-entity-driven triplet mining to align medical vision-LLMs by disease class, adjectival descriptors, and directional descriptors (Ozturk et al., 22 Apr 2025). TriMediQ, by contrast, applies triplet structuring to interactive medical QA, where the objective is not multimodal alignment or report normalization but dialogue-grounded diagnostic reasoning through a patient-specific KG (Meng et al., 3 Oct 2025).
This comparison helps prevent two common misunderstandings. First, TriMediQ is not simply a prompt-engineering method that reformats patient utterances; its central mechanism is graph-based integration plus prefix projection. Second, it is not a conventional full-parameter LLM fine-tuning approach; the patient and expert LLMs remain frozen, and only the projection module is optimized (Meng et al., 3 Oct 2025).
The framework’s empirical claims should also be interpreted within scope. The reported benefits are established on two interactive QA benchmarks and under the expert-patient setup used in the paper. The evidence directly supports the proposition that converting patient responses into structured triplet-based graphs enables more accurate clinical reasoning in multi-turn settings. A plausible implication is that the method may be especially useful where case evidence is distributed across many turns and requires relational aggregation. However, broader claims about universal clinical deployment, specialty transfer, or superiority across all interactive medical assistants would go beyond the reported evidence (Meng et al., 3 Oct 2025).
In summary, TriMediQ formalizes interactive medical reasoning as a pipeline of atomic fact elicitation, frozen triplet extraction, KG accumulation, graph encoding, and prefix-based expert guidance. Its central contribution is architectural rather than purely model-scaling based: the paper argues, and its ablations support, that explicit triplet structure and graph-mediated multi-hop reasoning materially improve diagnosis in interactive settings where raw dialogue alone is an inadequate reasoning substrate (Meng et al., 3 Oct 2025).