Fine-Tuning or Retrieval? Comparing Knowledge Injection in LLMs
Preprint
Abstract
Large language models (LLMs) encapsulate a vast amount of factual information within their pre-trained weights, as evidenced by their ability to answer diverse questions across different domains. However, this knowledge is inherently limited, relying heavily on the characteristics of the training data. Consequently, using external datasets to incorporate new information or refine the capabilities of LLMs on previously seen information poses a significant challenge. In this study, we compare two common approaches: unsupervised fine-tuning and retrieval-augmented generation (RAG). We evaluate both approaches on a variety of knowledge-intensive tasks across different topics. Our findings reveal that while unsupervised fine-tuning offers some improvement, RAG consistently outperforms it, both for existing knowledge encountered during training and entirely new knowledge. Moreover, we find that LLMs struggle to learn new factual information through unsupervised fine-tuning, and that exposing them to numerous variations of the same fact during training could alleviate this problem.Keywords
All Related Versions
This publication has 19 references indexed in Scilit:
- An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-TuningIEEE Transactions on Audio, Speech and Language Processing, 2025
- Toward expert-level medical question answering with large language modelsNature Medicine, 2025
- A Survey of Knowledge Enhanced Pre-Trained Language ModelsIEEE Transactions on Knowledge and Data Engineering, 2023
- Large language models encode clinical knowledgeNature, 2023
- A Survey of Knowledge-enhanced Text GenerationACM Computing Surveys, 2022
- Text Data Augmentation for Deep LearningJournal of Big Data, 2021
- WinoGrande: An Adversarial Winograd Schema Challenge at ScaleProceedings of the AAAI Conference on Artificial Intelligence, 2020
- Common Sense or World Knowledge? Investigating Adapter-Based Knowledge Injection into Pretrained Transformers2020
- Recall and Learn: Fine-tuning Deep Pretrained Language Models with Less Forgetting2020
- Billion-Scale Similarity Search with GPUsIEEE Transactions on Big Data, 2019