Current biomedical question answering (QA) systems often assume that medical knowledge applies uniformly, yet real-world clinical reasoning is inherently conditional: nearly every decision depends on patient-specific factors such as comorbidities and contraindications. Existing benchmarks do not evaluate such conditional reasoning, and retrieval-augmented or graph-based methods lack explicit mechanisms to ensure that retrieved knowledge is applicable to given context. To address this gap, we propose CondMedQA, the first benchmark for conditional biomedical QA, consisting of multi-hop questions whose answers vary with patient conditions. Furthermore, we propose Condition-Gated Reasoning (CGR), a novel framework that constructs condition-aware knowledge graphs and selectively activates or prunes reasoning paths based on query conditions. Our findings show that CGR more reliably selects condition-appropriate answers while matching or exceeding state-of-the-art performance on biomedical QA benchmarks, highlighting the importance of explicitly modeling conditionality for robust medical reasoning.
Figures & tables
Figure 1. Example of condition-gated reasoning in the biomedical domain. Existing KG-RAG extracts triples and retrieves contraindicated treatments. CGR extracts n-tuples with patient-specific conditions, gating unsafe paths and retrieving only safe alternatives .
Reasoning Category
%
Example(s)
Comorbidity & Organ-Based Contraindications
57
Doc 1: Treatment for major depressive disorder includes antidepressants such as bupropion , sertraline , and fluoxetine . Bupropion acts as a norepinephrine-dopamine reuptake inhibitor.
Doc 2: Bupropion lowers the seizure threshold and is contraindicated in patients with bulimia nervosa or other eating disorders due to elevated seizure risk.
Q: Which antidepressant for MDD is contraindicated in patients with bulimia ?
A: Bupropion (w/o condition: Sertraline )
Diagnostic Modality Selection
23
Doc 1: For suspected appendicitis , diagnostic imaging options include CT scan , ultrasound , and MRI . CT scan has the highest sensitivity in adult populations.
Doc 2: In pediatric patients , ultrasound is the preferred first-line imaging modality to avoid ionizing radiation exposure , with CT reserved for inconclusive cases.
Table 1. Types of conditional multi-hop reasoning required in CondMedQA. We show orange bold italics for bridge entities, blue italics for supporting facts, underline for the conditions, green bold for the conditional answer, and magenta for the general (non-conditional) answer. Each example requires synthesizing information across both documents, neither document alone contains sufficient information to answer the conditional question.
Dimension
Gwet’s AC
% Agree (all)
% Agree (pair)
Conditionality
0.96 (AC1)
96.7
97.8
Answer Accuracy
0.67 (AC1)
66.7
77.8
Question Quality
0.60 (AC2)
56.7
71.1
Table 2. Inter-annotator agreement across 30 items.
Figure 2. Overview of Condition-Gated Reasoning (CGR) compared to traditional KG-RAG. Given a clinical query about a patient with hypertension and bilateral renal artery stenosis (BRAS), traditional KG-RAG extracts standard relation triples and traverses all paths indiscriminately, retrieving evidence for contraindicated treatments (e.g., Lisinopril, an ACE inhibitor). CGR extends triples to n-tuples that include patient-specific conditions as gating constraints (e.g., ¬ BRAS, ¬ pregnancy), masking contraindicated paths during graph traversal and assembling only condition-appropriate evidence, yielding the correct answer (Amlodipine).
Method
CondMedQA
MedHopQA
MedHopQA (Cond)
BioASQ-B
EM
F1
EM
F1
EM
F1
EM
F1
GPT-5.2
Zero-Shot
22.00
41.29
20.50
47.87
28.27
53.52
13.00
40.21
RAG
44.00
52.36
51.25
62.61
45.71
55.04
31.80
54.80
CoT
40.00
52.81
49.50
57.55
50.00
59.38
25.60
47.81
HippoRAG2
46.00
67.56
45.00
60.81
48.57
72.82
22.60
43.57
Table 3. Performance comparison across biomedical multi-hop QA datasets and our custom benchmark. Bold indicates the best performance within each foundation model group.
Method
CondMedQA
MedHopQA
MedHop (C)
EM
F1
EM
F1
EM
F1
CGR w/o gating
57.0
60.2
72.5
76.8
62.9
73.5
CGR
82.0
86.7
86.8
89.9
80.0
85.4
Table 4. Ablation study on the effect of condition gating.
Figure 3. Hyperparameter sensitivity analysis. Top row: varying kpaths∈{1,3,5,10} . Bottom row: varying knodes∈{1,3,5,10} . Based on these results, we set kpaths=3 and knodes=5 for all experiments.
Extractor
CondMedQA
MedHopQA
MedHop (C)
Tok/s
s/doc
EM
F1
EM
F1
EM
F1
Flan-T5-Large
65.00
66.67
85.00
90.00
70.00
77.33
1053.95
21.69
LLaMA-3.2-3B
65.00
66.67
85.00
90.00
85.00
88.33
932.12
15.04
Qwen2.5-14B
65.00
66.67
85.00
92.50
85.00
88.33
1077.55
15.08
Table 5. Ablation study on n-tuple extraction model, showing that higher quality n-tuple extraction leads to better CGR performance. Tok/s = tokens per second, s/doc = seconds per document (throughput from vLLM)
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Document 1: HIV Treatment
“A large study in Africa and India found that a PI-based regimen was superior to an NNRTI-based regimen in children less than 3 years who had never been exposed to NNRTIs in the past. Thus the WHO recommends PI-based regimens for children less than 3 . In pregnant women , viral load is proportional to transmission risk; ART reduces transmission to mothers and infants before, during, and after delivery .”
Extracted N-Tuples:
⟨ PI-based regimen, superior_to , NNRTI-based regimen, [ children <3 years , not exposed to NNRTI ] ⟩
⟨ WHO, recommends , PI-based regimen, [ children <3 years ] ⟩
Table 6. Examples of condition-aware n-tuple extraction. Green text indicates patient-specific conditions extracted from source text and captured in the n-tuple conditions field.
Example 1: “Which gene causes cardiomyopathy in pediatric patients but not in adults?”
K (keywords)
[gene, cardiomyopathy, causes]
C (required)
[pediatric, in children]
C (excluded)
[in adults, adult patients]
N (negated)
[]
Interpretation: K matches nodes related to genes and cardiomyopathy. C gates traversal: only edges with pediatric/child conditions are followed; edges conditioned on adults are blocked.
Example 2: “What drug treats hypertension in pregnant women, excluding ACE inhibitors?”
Appendix
Table 7. Query parsing examples showing decomposition into keywords ( K ), conditions ( C ), and negated entities ( N ).
Example 1: “Which gene causes cardiomyopathy in pediatric patients but not in adults?”
Conditions
[pediatric, in children, in adults, adult patients]
Gating result: Edges conditioned on “pediatric” or “in children” are traversable ( G=1 ); edges conditioned on “in adults” or “adult patients” are blocked ( G=0 ).
Example 2: “What antibiotic is safe for a 5-year-old boy with pneumonia and no known allergies?”
Conditions
[in children, in adults, penicillin allergy, renal impairment, pregnancy]
Table 8. Condition evaluation examples showing how a single LLM call populates the lookup table L for edge gating.
Error Type
QID
Question
Gold
Predicted
Diagnosis
Retrieval (11/18)
23
What antibiotic is recommended for treating scrub typhus during pregnancy ?
Azithromycin
Doxycycline
Gold tuple with pregnancy condition exists in KG but not in top-ranked paths; typhus–doxycycline edge dominates ranking.
74
Which multikinase inhibitor is most effective for hepatocellular carcinoma in advanced (BCLC-C) unresectable disease ?
Sorafenib
Insufficient evidence
Gold tuple with BCLC-C condition in KG; top paths traverse unrelated edges. Gold never reaches evidence assembly.
Extraction (5/18)
65
Which csDMARD that has the side effect of liver cancer is the most effective for ankylosing spondylitis in peripheral arthritis ?
Methotrexate
Insufficient evidence
Methotrexate not extracted from source documents; KG lacks the gold entity entirely.
96
Which anxiolytic is preferred for generalized anxiety disorder in a patient who has myasthenia gravis ?
Buspirone
Sertraline
Buspirone absent from KG. Model correctly avoids benzodiazepines and selects SSRI; normalization maps SSRI to an incorrect canonical form.
Reasoning (2/18)
28
What imaging test is preferred for suspected pulmonary embolism in a pregnant patient due to lower radiation exposure?
V/Q scan
MRI w/o contrast
V/Q is the guideline alternative to CTPA in pregnancy; model over-optimizes for radiation avoidance and selects MRI.
99
Which antimycobacterial drug should be replaced in the RIPE regimen for a patient who is HIV-positive and receiving protease inhibitors ?
Rifabutin
Rifampin
Gold present in retrieved paths. Model answers the drug to be replaced (rifampin) rather than the replacement (rifabutin).
Appendix
Table 9. Error analysis of 18 incorrect CGR predictions on CondMedQA. Patient-specific conditions are highlighted in color . Two representative examples are shown per error type.
Biomedical question answering develops systems that answer health and life-science questions using clinical knowledge, research literature, and structured data.
College of Artificial Intelligence, Nanjing Agricultural University, Nanjing, China · School of Computer Science and Engineering, Nanjing University of Science and Technology, Nanjing, China
National Library of Medicine, Division of Intramural Research, Bethesda, MD, US · University of Illinois at Urbana-Champaign, Department of Computer Science, Urbana, IL, US · University of Michigan Medical School, Ann Arbor, Michigan, US
Department of Industrial Data Engineering, Hanyang University, Seoul, South Korea · School of Interdisciplinary Industrial Studies, Hanyang University, Seoul, South Korea