SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.01432 · 2024

Fine Tuning vs. Retrieval Augmented Generation for Less Popular Knowledge

arXiv · PDF · Open in the Atlas

Code that ran

15 of 19 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 14 failures of our instrument; 4 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2403.01432.json · badge: /api/ran/2403.01432.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
heydarsoudani/ragvsft canonical (classifier label)
classifier basis: census
15 ran · 4 no recorded run
FunctionStatusWhere it lives
calculate_relative_popularity Ran
ran; our contract draft was wrong, not the code
heydarsoudani/ragvsft/component0_preprocessing/relative_popularity_bucketing.py
pointer only (licence: NONE) · get_code("18e768963a04b1c3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

calculated_accuracy Ran
ran, honoured the contract we drafted
heydarsoudani/ragvsft/analysis/plot_results.py
pointer only (licence: NONE) · get_code("e1fee8e3b0d495f4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

convert_to_url_format Ran
ran; our contract draft was wrong, not the code
heydarsoudani/ragvsft/component0_preprocessing/create_costomized_dataset.py
pointer only (licence: NONE) · get_code("885a140ff8e2fe75")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_json_objects Ran
ran; our contract draft was wrong, not the code
heydarsoudani/ragvsft/component0_preprocessing/create_costomized_dataset.py
pointer only (licence: NONE) · get_code("9a0d33580478460b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_dataset_qa Ran
ran; our contract draft was wrong, not the code
heydarsoudani/ragvsft/component2_AnsGen/finetuning/flant5_finetuning.py
pointer only (licence: NONE) · get_code("a41e1c043c80020e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_dataset_qa Ran
ran; our contract draft was wrong, not the code
heydarsoudani/ragvsft/component2_AnsGen/finetuning/llm_finetuning.py
pointer only (licence: NONE) · get_code("adb13beccd33442d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_json_file Ran
ran; our contract draft was wrong, not the code
heydarsoudani/ragvsft/component2_AnsGen/finetuning/flant5_finetuning.py
pointer only (licence: NONE) · get_code("ae696033188ab5b7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_json_file Ran
ran; our contract draft was wrong, not the code
heydarsoudani/ragvsft/component2_AnsGen/finetuning/opt_finetuning.py
pointer only (licence: NONE) · get_code("ee3add82700b2786")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_json_file Ran
ran; our contract draft was wrong, not the code
heydarsoudani/ragvsft/component3_highlighter/sentence_highlighter.py
pointer only (licence: NONE) · get_code("5de2b9b470eeba70")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_json_files Ran
ran; our contract draft was wrong, not the code
heydarsoudani/ragvsft/component2_AnsGen/finetuning/opt_finetuning.py
pointer only (licence: NONE) · get_code("e9ad136bfabde8b4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_relations_data Ran
ran; our contract draft was wrong, not the code
heydarsoudani/ragvsft/component2_AnsGen/finetuning/flant5_finetuning.py
pointer only (licence: NONE) · get_code("48b100358417247d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_relations_data Ran
ran; our contract draft was wrong, not the code
heydarsoudani/ragvsft/component3_highlighter/sentence_highlighter.py
pointer only (licence: NONE) · get_code("3137917c97622aa7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

split_by_relation Ran
ran; our contract draft was wrong, not the code
heydarsoudani/ragvsft/component0_preprocessing/relative_popularity_bucketing.py
pointer only (licence: NONE) · get_code("b099238f8b55282e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

split_to_buckets Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
heydarsoudani/ragvsft/analysis/plot_results.py
pointer only (licence: NONE) · get_code("e353bb80690f02dd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

split_to_buckets Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
heydarsoudani/ragvsft/component1_retrieval/utils.py
pointer only (licence: NONE) · get_code("b0f02c29c4153f5c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_wikipedia_title_from_wikidata Not yet run
unverified (harvested, no recorded run)
heydarsoudani/ragvsft/component0_preprocessing/create_costomized_dataset.py
pointer only (licence: NONE) · get_code("02f693941998e280")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

main Not yet run
unverified (harvested, no recorded run)
heydarsoudani/ragvsft/component1_retrieval/data_postprocessing.py
pointer only (licence: NONE) · get_code("d8772189b543b83f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

sig_test Not yet run
unverified (harvested, no recorded run)
heydarsoudani/ragvsft/analysis/plot_results.py
pointer only (licence: NONE) · get_code("ea3cc6f0ff764ddf")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

split_to_buckets Not yet run
unverified (harvested, no recorded run)
heydarsoudani/ragvsft/component0_preprocessing/relative_popularity_bucketing.py
pointer only (licence: NONE) · get_code("7018bfe9d2340be1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heydarsoudani/ragvsft when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 17 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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}.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2403.01432")
get_code_for_paper("2403.01432")
have("2403.01432")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2403.01432.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2403.01432.svg)](https://syntology.ai/paper/2403.01432)

Connect an agent — have() is free.