Abstract: Mastering medical knowledge is crucial for medical-specific LLMs. However, despite the existence of medical benchmarks like MedQA, a unified framework that fully leverages existing knowledge bases to evaluate LLMs' mastery of medical knowledge is still lacking. In the study, we propose a novel framework PretexEval that dynamically generates reliable and diverse test samples to evaluate LLMs for any given medical knowledge base. We notice that test samples produced directly from knowledge bases by templates or LLMs may introduce factual errors and also lack diversity. To address these issues, we introduce a novel schema into our proposed evaluation framework that employs predicate equivalence transformations to produce a series of variants for any given medical knowledge point. Finally, these produced predicate variants are converted into textual language, resulting in a series of reliable and diverse test samples to evaluate whether LLMs fully master the given medical factual knowledge point. Here, we use our proposed framework to systematically investigate the mastery of medical factual knowledge of 12 well-known LLMs, based on two knowledge bases that are crucial for clinical diagnosis and treatment. The evaluation results illustrate that current LLMs still exhibit significant deficiencies in fully mastering medical knowledge, despite achieving considerable success on some famous public benchmarks. These new findings provide valuable insights for developing medical-specific LLMs, highlighting that current LLMs urgently need to strengthen their comprehensive and in-depth mastery of medical knowledge before being applied to real-world medical scenarios.
Introduction
As Large Language Models (LLMs) are increasingly deployed in healthcare, verifying their medical knowledge is critical. Traditionally, evaluation relies on static, expert-annotated benchmarks like MedQA. However, these datasets eventually become outdated or accidentally leak into models' training data, inflating their scores.
An alternative is to dynamically generate test questions from structured medical knowledge bases (like UMLS). However, direct generation often suffers from insufficient factuality—where LLMs hallucinate incorrect relationships—and low structural diversity, where models merely swap synonyms rather than changing sentence structure. This paper introduces PretexEval, a framework that guarantees factual reliability and high structural diversity to probe whether an LLM truly understands a medical concept or has simply memorized a specific phrasing.
Methodology: The PretexEval Framework
To solve the reliability and diversity issues, the authors propose PretexEval (Predicate-to-text Evaluation). Instead of relying on an LLM to freely generate text, the system uses a controlled, three-step pipeline.
- Predicate Variant Generation: A medical knowledge triplet is expressed as a logical predicate. The system applies strict logical transformations: Inversion (viewing the relationship from the other direction), Instantiation (applying a rule to a specific case), and Double Negation (creating logically equivalent negative expressions).
- Prototype-based Generation: These logical variants are mapped to pre-crafted, human-verified text templates to ensure zero factual errors.
- LLM Rephrasing: Finally, a strong LLM (Llama3-70B-Instruct) rephrases these templates to add lexical variety without breaking the core meaning.
Key Results and Insights
The framework was validated using the MedLAMA and DiseK knowledge bases. Models were evaluated on a True/False statement verification task, with a focus on Joint Accuracy—the ability of a model to correctly identify all variants of a single knowledge point.
The Illusion of Mastery
High scores on standard medical benchmarks do not equate to deep understanding. As shown in the figure above, Joint Accuracy plummets as more logical variants are added. If a model truly "knows" a fact, it should answer correctly regardless of phrasing; however, current models struggle to maintain this consistency.
Performance Highlights
- Top Performer: GPT-4o outperformed all other models, achieving the highest average accuracy gains over random guessing (+31.7% on MedLAMA).
- Negation Vulnerability: Models struggled most with double negation, indicating a specific linguistic weakness in medical contexts.
- Fine-Tuning Efficacy: Domain-specific models (like ClinicalCamel-70B and Med42-70B) significantly outperformed their base models, demonstrating that specialized training deepens robust knowledge retrieval.
Conclusion
PretexEval reveals that current LLMs still exhibit significant deficiencies in fully mastering medical knowledge. The sharp drop in joint accuracy across logical variants suggests that models rely more on surface-level pattern matching than deep factual understanding. These findings highlight the urgent need for more rigorous, logically diverse evaluation frameworks before LLMs can be safely applied to real-world clinical scenarios.
Summary updated