Papers › Fine Tuning vs. Retrieval Augmented Generation for Less Popular Knowledge

Fine Tuning vs. Retrieval Augmented Generation for Less Popular Knowledge

3 Mar 2024arXiv:2403.01432archive 2025-07-28

Heydar Soudani, Evangelos Kanoulas, Faegheh Hasibi

Language Models (LMs) memorize a vast amount of factual knowledge, exhibiting strong performance across diverse tasks and domains. However, it has been observed that the performance diminishes when dealing with less-popular or low-frequency concepts and entities, for example in domain specific applications. The two prominent approaches to enhance the performance of LMs on low-frequent topics are: Retrieval Augmented Generation (RAG) and fine-tuning (FT) over synthetic data. This paper explores and evaluates the impact of RAG and FT on customizing LMs in handling low-frequency entities on question answering tasks. We conduct extensive experiments on twelve LMs of varying size and type and different fine tuning, data augmentation, and retrieval models. Our findings indicate that while FT boosts the performance across entities of varying popularity, RAG surpasses FT by a large margin particularly for least popular factual knowledge. Additionally, the success of both RAG and FT approaches is amplified by improving retrieval and data augmentation techniques. Fine tuning, while beneficial for small LMs, requires extensive resources. To address this issue, we propose the new Stimulus RAG approach that surpasses the effectiveness of fine tuning based approaches, thereby eliminating the need for the costly data augmentation and fine tuning step for enriching LMs with less popular factual knowledge. The code is available at \url{https://github.com/informagi/RAGvsFT}.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2403.01432")

Code

Syntology Ran 15 of 19 code samples harvested from 1 repository linked to this paper; 4 have no recorded run. Of those that ran: 15 ran with no contract checked.

By repository: official repository: 19 samples from 1 repository, 15 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

heydarsoudani/ragvsft officialmentioned in paperpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

19 samples harvested; 15 ran; 0 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

15ran
4unverified

Licence: 19 of the 19 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from heydarsoudani/ragvsft. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

calculate_relative_popularity heydarsoudani/ragvsft/component0_preprocessing/relative_popularity_bucketing.py official repository ran no licence file found · pointer only · 18e768963a04b1c3 · report
calculated_accuracy heydarsoudani/ragvsft/analysis/plot_results.py official repository ran no licence file found · pointer only · e1fee8e3b0d495f4 · report
convert_to_url_format heydarsoudani/ragvsft/component0_preprocessing/create_costomized_dataset.py official repository ran fingerprinted no licence file found · pointer only · 885a140ff8e2fe75 · report
extract_json_objects heydarsoudani/ragvsft/component0_preprocessing/create_costomized_dataset.py official repository ran fingerprinted no licence file found · pointer only · 9a0d33580478460b · report
load_dataset_qa heydarsoudani/ragvsft/component2_AnsGen/finetuning/flant5_finetuning.py official repository ran no licence file found · pointer only · a41e1c043c80020e · report
load_dataset_qa heydarsoudani/ragvsft/component2_AnsGen/finetuning/llm_finetuning.py official repository ran no licence file found · pointer only · adb13beccd33442d · report
load_json_file heydarsoudani/ragvsft/component2_AnsGen/finetuning/flant5_finetuning.py official repository ran no licence file found · pointer only · ae696033188ab5b7 · report
load_json_file heydarsoudani/ragvsft/component2_AnsGen/finetuning/opt_finetuning.py official repository ran no licence file found · pointer only · ee3add82700b2786 · report
load_json_file heydarsoudani/ragvsft/component3_highlighter/sentence_highlighter.py official repository ran no licence file found · pointer only · 5de2b9b470eeba70 · report
load_json_files heydarsoudani/ragvsft/component2_AnsGen/finetuning/opt_finetuning.py official repository ran no licence file found · pointer only · e9ad136bfabde8b4 · report
load_relations_data heydarsoudani/ragvsft/component2_AnsGen/finetuning/flant5_finetuning.py official repository ran no licence file found · pointer only · 48b100358417247d · report
load_relations_data heydarsoudani/ragvsft/component3_highlighter/sentence_highlighter.py official repository ran no licence file found · pointer only · 3137917c97622aa7 · report
split_by_relation heydarsoudani/ragvsft/component0_preprocessing/relative_popularity_bucketing.py official repository ran no licence file found · pointer only · b099238f8b55282e · report
split_to_buckets heydarsoudani/ragvsft/analysis/plot_results.py official repository ran no licence file found · pointer only · e353bb80690f02dd · report
split_to_buckets heydarsoudani/ragvsft/component1_retrieval/utils.py official repository ran no licence file found · pointer only · b0f02c29c4153f5c · report
get_wikipedia_title_from_wikidata heydarsoudani/ragvsft/component0_preprocessing/create_costomized_dataset.py official repository unverified no licence file found · pointer only · 02f693941998e280 · report
main heydarsoudani/ragvsft/component1_retrieval/data_postprocessing.py official repository unverified no licence file found · pointer only · d8772189b543b83f · report
sig_test heydarsoudani/ragvsft/analysis/plot_results.py official repository unverified no licence file found · pointer only · ea3cc6f0ff764ddf · report
split_to_buckets heydarsoudani/ragvsft/component0_preprocessing/relative_popularity_bucketing.py official repository unverified no licence file found · pointer only · 7018bfe9d2340be1 · report

Tasks

Data AugmentationQuestion AnsweringRAGRetrievalRetrieval-augmented Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdamAttentionAttention DropoutBARTBERTBPEDense ConnectionsDropoutLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionRAGResidual ConnectionSoftmaxWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections