Introduction
Large Language Models (LLMs) are revolutionizing medical question-answering, yet they remain prone to "hallucinations"—generating plausible but factually incorrect medical advice. While Retrieval-Augmented Generation (RAG) mitigates this by providing external literature, it introduces new complexities. Medical literature is often contradictory or rapidly evolving; a RAG system might retrieve conflicting papers, leaving the LLM to resolve discrepancies without a structured methodology. M-Eval addresses this by applying the rigorous principles of Evidence-Based Medicine (EBM) to automate the validation of AI-generated medical claims.
The M-Eval Framework
M-Eval is a backend verification system designed to act as a safety net for medical RAG systems. It moves beyond simple "majority voting" of retrieved documents by conducting a structured "heterogeneity analysis" inspired by clinical meta-analysis.
The pipeline consists of four primary stages:
- Claim Extraction: The system uses a specialized medical Spacy model to decompose an LLM's response into discrete, verifiable claims.
- Multi-Evidence Retrieval: To ensure a robust knowledge base, M-Eval retrieves up to 15 additional relevant articles from PubMed using BM25 scoring, supplementing the RAG system's initial context.
- Reliability Scoring: Articles are weighted based on their publication type (e.g., systematic reviews vs. case reports), recency, and an LLM-driven assessment of methodological bias.
- Heterogeneity Analysis: This core component calculates a weighted "stance" for each claim, determining if the collective weight of high-quality evidence supports or refutes the AI's response.
Heterogeneity Analysis: The Core Innovation
The defining feature of M-Eval is its use of the DerSimonian–Laird random-effects model. In traditional EBM, this model is used in meta-analyses to account for variation between different studies. M-Eval adapts this to calculate a weighted consensus across retrieved evidence. By treating high-quality, recent meta-analyses as more authoritative than older case reports, the system provides a nuanced validation that mirrors human clinical reasoning. If the evidence is too fragmented or the "heterogeneity" (conflict) between sources is too high, the system flags the response as potentially incorrect.
Experimental Results
The framework was evaluated using the PubMed dataset across several prominent models, including Qwen2.5, Mistral-7B, Gemma2-9B, and Llama3-8B. Researchers tested the system in two environments: a "Finer Group" with high-quality context and a "Random Group" containing noisy, irrelevant evidence.
Key findings include:
- Accuracy Improvement: M-Eval improved response accuracy by up to 23.31% compared to standard LLM outputs.
- Robustness against Noise: The system consistently outperformed "self-checking" baselines, proving that external structured validation is superior to an LLM's internal self-correction.
- High Specificity: M-Eval achieved specificity scores between 80-90%, effectively identifying incorrect claims—a critical requirement for safety-critical medical applications.
Conclusion
M-Eval demonstrates that the rigor of Evidence-Based Medicine can be successfully integrated into AI workflows to combat hallucinations. By automating heterogeneity analysis, the framework provides a scalable way to ensure that medical RAG systems remain grounded in the most reliable scientific literature. Future work will focus on expanding this framework to multimodal data and refining the detection of subtle contradictions in complex medical texts.
Summary updated