Introduction
Large Language Models (LLMs) are powerful but suffer from static knowledge bases. Once training concludes, their internal information is frozen, leading to two primary issues: the "outdated information" problem regarding recent events and a lack of "nuanced expertise" in specialized domains. To address this, researchers typically employ either Fine-Tuning (FT)—updating model weights with new data—or Retrieval-Augmented Generation (RAG)—providing relevant context at inference time. This paper evaluates which method is more effective for injecting new knowledge into LLMs.
Methodology
The study compared three 7B-parameter models—Mistral-7B, Llama2-7B, and Orca2-7B—across four configurations:
- Base Model: The original pre-trained model.
- RAG: Utilizing a vector store (FAISS) and an embedding model (bge-large-en) to retrieve context.
- Fine-Tuning (FT): Unsupervised fine-tuning (continual pre-training) on raw text.
- FT + RAG: A hybrid approach using a fine-tuned model as the generator in a RAG pipeline.
To test the limits of weight-based learning, the authors also explored data augmentation, using multiple paraphrased versions of facts to encourage the model to "absorb" information through repetition.
Datasets and Benchmarks
The evaluation relied on two distinct datasets:
- MMLU (Massively Multilingual Language Understanding): Five knowledge-intensive subjects (Anatomy, Astronomy, Biology, Chemistry, and Prehistory) were used to test the refinement of existing knowledge.
- Current Events (New): A custom benchmark of 910 multiple-choice questions based on Wikipedia articles from August to November 2023. This served as a "clean room" for testing entirely new knowledge injection.
Key Insights: RAG vs. Fine-Tuning
The empirical results demonstrate that RAG is the superior method for knowledge injection. While fine-tuning attempts to bake facts into the model's weights, it often fails to do so effectively without extreme repetition.
The Repetition Requirement
A critical finding is that LLMs struggle to learn a fact from a single exposure during fine-tuning. To achieve even modest memorization, the model requires the same fact to be presented in numerous paraphrased formats. Even with 10 paraphrases, performance lagged significantly behind RAG.
Stability and Forgetting
Fine-tuning proved to be unstable. For instance, unsupervised fine-tuning actually degraded Llama2-7B's performance on current events, suggesting a risk of "catastrophic forgetting" or poor integration of new facts without careful alignment.
Performance Results
On the Current Events task, Mistral-7B’s accuracy rose from 48.1% (Base) to 87.5% with RAG. Standard fine-tuning only reached 50.4%. Even with paraphrasing, FT only improved Mistral to 58.8%. Similar trends were observed in MMLU tasks; for Anatomy (0-shot), Mistral improved from 55.6% to 68.1% via RAG, outperforming the gains from fine-tuning.
Conclusion and Limitations
RAG consistently outperforms unsupervised fine-tuning for both updating and expanding an LLM's knowledge base. The authors liken the methods to a student taking a test: the base model is unprepared, the fine-tuned model studied but has no notes, and the RAG model has the textbook open.
However, RAG is sensitive to hyperparameters like the number of retrieved documents ($K$), and unsupervised fine-tuning might be outperformed by supervised alternatives (SFT). Future research should investigate how knowledge is theoretically represented in weights and how these methods scale to complex reasoning tasks requiring multi-document synthesis.
Summary updated