TL;DR
This paper introduces MKRAG, a novel Retrieval Augmented Generation (RAG) approach to improve Large Language Model (LLM) performance on medical question answering (QA). By retrieving relevant medical facts from an external knowledge base and injecting them into the LLM's prompt, MKRAG significantly boosts accuracy without requiring model fine-tuning.
What Problem Does This Paper Address?
Large Language Models (LLMs) have demonstrated impressive capabilities across various domains. However, they often struggle with specialized knowledge, particularly in fields like medicine. This is partly because medical knowledge is vast, complex, and often stored in formats not readily accessible during LLM pre-training. Furthermore, LLMs are often treated as "black boxes," making it difficult to directly inject or update their knowledge. This paper tackles the challenge of enhancing LLM performance on medical QA tasks by providing them with relevant external medical knowledge in a transparent and efficient manner.
Methods
The core of MKRAG lies in its two-phase approach: Medical Facts Retrieval and Knowledge Injection.
- Medical Facts Retrieval: This phase aims to extract the most relevant medical facts for a given question and its answer choices.
- Preparation: The external knowledge base (a disease database) is first converted into embeddings using a pre-trained language model (like Contriever or SapBERT).
- Broad Search: For each answer candidate, the system retrieves the top-K most similar facts from the embedded knowledge base. This forms an initial set of facts.
- Refined Search: To filter out irrelevant information, the question is also embedded. Then, the top-k facts from the initial set that are most similar to the question embedding are selected, forming the refined facts set. This two-step process ensures that the retrieved facts are both relevant to the answer choices and the question itself.
- Knowledge Injection: The retrieved medical facts are then injected into the LLM's prompt using an in-context learning approach. This means the facts are presented to the LLM as part of the input, alongside the question and answer choices, without modifying the LLM's internal parameters. The LLM then uses this augmented context to generate its answer.
Datasets
- MedQA-USMLE Dataset: This is the primary dataset used for evaluation. It's a comprehensive collection of multiple-choice questions derived from professional medical exams (USMLE, MCMLE, TWMLE) covering a wide range of medical subjects. It requires models to retrieve relevant information and perform complex reasoning. The paper specifically uses the English portion of this dataset.
- Disease Database: Used as the external knowledge base for retrieving medical facts. It contains 44,561 triplets.
- CounterFact Dataset: Used in a preliminary experiment to compare LLM performance on medical vs. general domain factual knowledge.
Key Insights and Ideas
- RAG for Medical QA is Effective: The paper strongly demonstrates that augmenting LLMs with retrieved medical knowledge significantly improves their performance on medical QA tasks.
- In-Context Learning is a Viable Alternative to Fine-Tuning: MKRAG shows that knowledge can be effectively injected into LLMs via prompts, bypassing the need for computationally expensive fine-tuning or retraining.
- A Two-Step Retrieval Strategy is Crucial: Simply retrieving facts related to answer candidates isn't enough. Refining the retrieved facts based on the question itself is key to filtering out noise and ensuring relevance.
- General Domain Embeddings Can Outperform Domain-Specific Ones: The Contriever model, pre-trained on a general domain corpus, outperformed SapBERT (specialized for medical domains) in the retrieval task. This suggests that broader language understanding can be beneficial even in specialized contexts.
- More Facts (Within Limits) Lead to Better Performance: Increasing the number of retrieved facts injected into the prompt generally leads to higher accuracy, up to the prompt's length constraints.
Key Results
- Accuracy Improvement: The retrieval-augmented Vicuna-7B model achieved an accuracy of 48.54% on the MedQA-USMLE dataset, a significant improvement over the vanilla Vicuna-7B model's accuracy of 44.46%.
- Outperforming Baselines: MKRAG's performance surpassed several established baseline models, including BERT-base, BioBERT-large, SapBERT, and QA-GNN, which achieved accuracies in the range of 34.1% to 38.0%.
- Retrieval Model Performance: Contriever achieved slightly better retrieval performance (48.54% accuracy) compared to SapBERT (48.07% accuracy).
- Impact of Fact Number: Increasing the number of retrieved facts from 4 to 16 led to a consistent increase in accuracy for both Contriever and SapBERT.
Limitations and Future Work
- Prompt Length Constraints: The effectiveness of injecting more facts is ultimately limited by the LLM's maximum input token length.
- Retrieval Model Choice: While Contriever showed better performance, the paper acknowledges the importance of choosing the right retrieval technique.
- Future Work: The authors suggest that their work provides a practical approach for improving LLMs in domain-specific tasks and opens avenues for further research into optimizing retrieval and injection strategies. They also highlight the potential for MKRAG to be applied to other domain-specific QA tasks.
Summary updated