Large language models (LLMs) perform well across many real-world tasks but remain prone to hallucination, limiting their reliability in domains such as biomedicine and healthcare, where answers must be grounded in established knowledge. Retrieval-augmented generation (RAG) mitigates this problem by incorporating external information, but often overlooks logical relationships and relies heavily on the LLM's own reasoning, which can compromise answer faithfulness. We propose OA-RAG, an agent that integrates formal reasoning with LLM reasoning, drawing on both the logical structure and informal annotations of domain ontologies. For each answer, OA-RAG reports the ontology observations used as evidence and a model-assessed grounding level (entailed, supported, related, or unrelated) that characterises the strength of that evidence. Across benchmarks derived from three large-scale ontologies and six real-world medical question-answering tasks, OA-RAG achieves the best overall performance among the evaluated ontology-fine-tuned and popular RAG methods, with particularly strong results on reasoning-intensive tasks. The reported grounding levels also offer a useful indication of answer reliability, with stronger grounding generally associated with higher accuracy. Finally, our results demonstrate the value of ontologies as knowledge sources: OA-RAG is competitive with, and sometimes outperforms, domain-specific RAG systems that draw on sources such as textbooks.
Figures & tables
Figure 1. Three ontology-augmented LLM reasoning patterns, ordered from greatest to least faithfulness to the ontology: (a) the answer is can be inferred from the ontology’s formal axioms; (b) an LLM can infer the answer based on the ontology’s formal axioms and informal annotations; and (c) an LLM generates the answer freely, with optional grounding in relevant ontology content (classic RAG).
Figure 2. Overall framework of OA-RAG: (1) pre-tool reasoning; (2) a ReAct loop of SPARQL queries to the ontology service (name linking, reasoner, query fallback); (3) answering from the evidence digest, with the cited evidence and a grounding level.
Table 1. Overall accuracy (%). Average: mean across the three tests after within-test averaging. † : from OntoTune ( Liu et al., 2025a ) . (262k): full 262k-token context. Red / blue : best / second best.
Figure 5
Figure 3. Grounding levels reported by OA-RAG. (a) Percentage of all questions at each level; note that a part of answers have no grounding levels. (b) Answer accuracy within each grounding level; m is the number of corresponding questions.
Figure 4. Ratio of questions whose gold evidence is retrieved and selected (%).
Variant
Test 1
Test 2
Test 3
Average
MCQ
OQ
MCQ
OQ
Backbone: Llama-3-8B-Instruct
OA-RAG
62.0
45.0
52.2
18.0
62.8
50.5
pre-tool reasoning only
43.4
4.8
43.8
4.5
61.9
36.7
↓ 13.8
w/o answering step
57.3
38.7
48.0
7.9
58.1
44.7
↓ 5.8
w/o query fallback
62.1
42.7
52.6
9.3
62.8
48.7
↓ 1.8
Table 2. Ablation of OA-RAG (accuracy %): each indented row changes one component; ↓ : drop of percentage points over the original OA-RAG.
Figure 5. Two Test 3 trajectories of OA-RAG (Qwen), with intermediate reasoning omitted for brevity.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 6. Tool calls of OA-RAG per question by query form ( SELECT : all its variants). Test 3 pools its six sets.
Method
Test 1
Test 2
GO
FoodOn
SNOMED CT
GO
FoodOn
SNOMED CT
MCQ
OQ
MCQ
OQ
MCQ
OQ
MCQ
OQ
MCQ
OQ
MCQ
OQ
Llama
Direct
50.7
5.0
33.7
12.0
51.0
6.5
50.7
5.0
33.8
12.4
51.9
6.9
CoT
47.7
1.0
32.0
6.5
35.0
1.5
47.7
1.0
32.1
6.7
35.6
1.6
RAG ont (text)
55.0
0.5
53.3
3.5
44.3
5.0
55.7
1.5
51.8
5.7
52.5
6.9
Appendix
Table 3. Test 1 and Test 2 accuracy (%) by source ontology. Red / blue : best / second best per model and test.
Figure 7. OA-RAG on Test 1 and Test 2 by item construction (accuracy %; dashed: MCQs scored with at least one correct and no wrong choice).
GO
FoodOn
SNOMED CT
Named concepts
51,986
30,995
374,546
Roles
9
69
126
Axioms (Test 1)
82,950
44,986
375,261
Axioms (Test 2)
65,810
36,881
375,261
Appendix
Table 4. Sizes of the ontologies (Test 1: source; Test 2: revised).
GO
FoodOn
SNOMED CT
All
T1
T2
T1
T2
T1
T2
T1
T2
MCQ
#Ans =1
203
203
230
230
236
235
669
668
#Ans =2
58
58
43
43
39
39
140
140
#Ans =3
39
39
27
26
25
21
91
86
OQ
n=2
67
67
67
67
67
65
201
199
n=3
67
67
67
65
67
61
201
193
Appendix
Table 5. Tests 1 (T1) and 2 (T2): MCQs by the number of correct options (#Ans), and OQs by the number of conditions n .
Retrieval-Augmented Generation (RAG) significantly improves the factuality of Large Language Models (LLMs), yet standard pipelines often lack mechanisms to verify inter- mediate reasoning, leaving them vulnerable to hallucinations in high-stakes domains. To address this, we propose a domain-specific RAG framework that integrates explicit rea- soning and faithfulness verification. Our architecture augments standard retrieval with neural query rewriting, BGE-based cross-encoder reranking, and a rationale generation module that grounds sub-claims in specific evidence spans. We further introduce an eight-category verification taxonomy that enables fine-grained assessment of rationale faithfulness, distinguishing between explicit and implicit support patterns to facilitate structured error diagnosis. We evaluate this framework on the BioASQ and PubMedQA benchmarks, specifically analyzing the impact of dynamic in-context learning and rerank- ing under constrained token budgets. Experiments demonstrate that explicit rationale generation improves accuracy over vanilla RAG baselines, while dynamic demonstration selection combined with robust reranking yields further gains in few-shot settings. Using Llama-3-8B-Instruct, our approach achieves 89.1% on BioASQ-Y/N and 73.0% on Pub- MedQA, competitive with systems using significantly larger models. Additionally, we perform a pilot study combining human expert assessment with LLM-based verification to explore how explicit rationale generation improves system transparency and enables more detailed diagnosis of retrieval failures in biomedical question answering.
Eeham Khan, Luis Rodriguez, Marc Queudot
Concordia University, Montréal, QC, Canada · Centre de recherche informatique de Montréal (CRIM), Montréal, QC, Canada
Retrieval-Augmented Generation (RAG) is widely employed to mitigate risks such as hallucinations and knowledge obsolescence in medical question answering, yet its predominantly single-round, static retrieval paradigm misaligns with the multi-stage process of clinical reasoning. This compressed workflow induces two structural deficiencies: question-to-query translation often lacks clinically grounded semantic interpretation, and retrieval lacks iterative sufficiency feedback, making it difficult to form reliable evidence chains. We argue that both issues stem from a deeper cause: overloading a single reasoning chain with heterogeneous tasks of interpretation, exploration, and adjudication. The remedy is to reconstruct the workflow via task decoupling and dynamic multi-round exploration. To this end, we propose SEMA-RAG, a Self-Evolving Multi-Agent RAG framework for medical question answering, which assigns these roles to three specialist agents: the Interpreter Agent for clinical schema interpretation, the Explorer Agent for sufficiency-driven self-evolving retrieval, and the Arbiter Agent for evidence adjudication and answer selection. Across five benchmarks and five LLM backbones, SEMA-RAG improves the strongest baseline by +6.46 accuracy points on average, measured per backbone.
Yongfeng Huang, Ruiying Chen, James Cheng
CSE, The Chinese University of Hong Kong · Wuhan University of Technology
Retrieval-augmented generation (RAG) is a widely used approach for grounding large language models (LLMs) in external knowledge. However, configuring a pipeline is an expensive hyperparameter optimization problem over many interacting choices, from chunking and embedding model to reranking and generation. Existing optimizers, from greedy search to Bayesian optimization, reduce each trial to an aggregate score and search without modeling why a configuration performed as it did, even though the retrieved chunks already provide evidence about whether each failure occurred during retrieval or after it. We introduce Agentic AutoRAG, an LLM-agent optimizer for multi-objective RAG hyperparameter optimization with retrieval-versus-generation failure attribution. It proposes configurations scored on a frozen exam from the corpus: after each trial a Diagnoser attributes each failed question to retrieval or generation, and a Proposer, grounded in a knowledge base of model rankings and pricing, selects the next configuration, weighing accuracy against cost to trace a Pareto frontier. On three multi-hop QA benchmarks it reaches higher LLM-judge accuracy than every baseline we compare, and within its first 10 trials it matches or beats the statistical baselines' full 30-trial judge accuracy. In its cost-aware mode on a real-world healthcare corpus it reaches a median exam accuracy of 77%, above the strongest baseline's 71.5%, at about 58% of that baseline's cost per query, and it matches that 71.5% at about 22% of the cost.
Lasse B. Strand, Robert Jakob, Kevin O'Sullivan +1