HackerPapers

arXiv:2312.05934cs.AI

Fine-Tuning or Retrieval? Comparing Knowledge Injection in LLMs

Oded Ovadia, Menachem Brief, Moshik Mishaeli, Oren Elisha

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

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.

arXiv comments
Journal reference
DOI
Subjects
cs.AIArtificial Intelligence cs.CLComputation and Language cs.LGMachine Learning

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Jun 2024 to Jun 2024. Found in 3 HN submissions from Dec 2023 to Feb 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

    • This was kind of conventional wisdom ("fine tune only when absolutely necessary for your domain", "fine-tuning hurts factuality"), but some recent research (some of which they cite) has actually quantitatively shown that RAG is much preferable to FT for adding domain-specific…

      gandalfgeekView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.