SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.09629 · EMNLP · 2024

Synthetic Knowledge Ingestion: Towards Knowledge Refinement and Injection for Enhancing Large Language Models

Jiaxin Zhang, Kamalika Das, Sricharan Kumar, Yiran Huang, Wendi Cui

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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; 5 failures of our instrument; 1 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/2410.09629.json · badge: /api/ran/2410.09629.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
intuit-ai-research/knowledge-infused-ai canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_exact Ran
ran, honoured the contract we drafted
intuit-ai-research/knowledge-infused-ai/synthetic-knowledge-ingestion/finetuning/ft_llama_factory.py
code served (permissive licence) · get_code("9026d9da5d085bd4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re
import string

def normalize_answer(s):
    """Lower text and remove punctuation, articles and extra whitespace."""

    def remove_articles(text):
        regex = re.compile('\\b(a|an|the)\\b', re.UNICODE)
        return re.sub(regex, ' ', text)

    def white_space_fix(text):
        return ' '.join(text.split())

    def remove_punc(text):
        exclude = set(string.punctuation)
        return ''.join((ch for ch in text if ch not in exclude))

    def lower(text):
        return text.lower()
    return white_space_fix(remove_articles(remove_punc(lower(s))))

def compute_exact(a_gold, a_pred):
    return int(normalize_answer(a_gold) == normalize_answer(a_pred))

ARGS = {
    "a_gold": "The quick brown fox jumps over the lazy dog.",
    "a_pred": "the quick brown fox jumps over the lazy dog"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
data_split Ran
ran; our contract draft was wrong, not the code
intuit-ai-research/knowledge-infused-ai/synthetic-knowledge-ingestion/finetuning/data_preparation.py
code served (permissive licence) · get_code("d889e2a80bfef40d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
from datasets import Dataset, DatasetDict

# Create a temporary directory for output
temp_dir = tempfile.mkdtemp()

# Create sample data_dict with question-answer pairs
data_dict = {
    'context1': [
        ('What is 2+2?', 'The answer is 4'),
        ('What is the capital of France?', 'Paris'),
    ],
    'context2': [
        ('What is AI?', 'Artificial Intelligence'),
        ('What is ML?', 'Machine Learning'),
    ]
}

ARGS = {
    'data_dict': data_dict,
    'output_path': temp_dir,
    'train_test_ratio': 0.2,
    'train_val_ratio': 0.1,
    'task': 'sft',
    'transform': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
datasets — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_tokens Ran
ran; our contract draft was wrong, not the code
intuit-ai-research/knowledge-infused-ai/synthetic-knowledge-ingestion/finetuning/ft_llama_factory.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from saptarshi059/cdqa-project, is pointer only (licence: NONE) · get_code("aa6bc32d9c17a2f1")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from saptarshi059/cdqa-project, and GitHub detected no licence in that repository 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.

normalize_answer Ran
ran; our contract draft was wrong, not the code
intuit-ai-research/knowledge-infused-ai/synthetic-knowledge-ingestion/finetuning/ft_llama_factory.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from saptarshi059/cdqa-project, is pointer only (licence: NONE) · get_code("6a96435eba311b08")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from saptarshi059/cdqa-project, and GitHub detected no licence in that repository 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.

read_data Ran
ran; our contract draft was wrong, not the code
intuit-ai-research/knowledge-infused-ai/synthetic-knowledge-ingestion/finetuning/data_preparation.py
code served (permissive licence) · get_code("800b0a442a1854a8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
import os

# Create temporary JSON files for testing
temp_dir = tempfile.mkdtemp()

# Create first data file
data_file_1 = os.path.join(temp_dir, 'data1.json')
with open(data_file_1, 'w', encoding='utf-8') as f:
    json.dump({
        'key1': [1, 2, 3],
        'key2': ['a', 'b']
    }, f)

# Create second data file
data_file_2 = os.path.join(temp_dir, 'data2.json')
with open(data_file_2, 'w', encoding='utf-8') as f:
    json.dump({
        'key1': [4, 5],
        'key3': [True, False]
    }, f)

# Define ARGS for read_data function
ARGS = {
    'data_paths': [data_file_1, data_file_2]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_dataset Ran
ran; our contract draft was wrong, not the code
intuit-ai-research/knowledge-infused-ai/synthetic-knowledge-ingestion/finetuning/data_preparation.py
code served (permissive licence) · get_code("1b76e6eb9feedfc5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Dataset. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import datasets
import tempfile
import os

# Create temporary directories with mock datasets
temp_dir_1 = tempfile.mkdtemp()
temp_dir_2 = tempfile.mkdtemp()

# Create and save a small dataset to disk
data_1 = {
    "text": ["hello world", "foo bar"],
    "label": [0, 1]
}
dataset_1 = datasets.Dataset.from_dict(data_1)
dataset_1.save_to_disk(temp_dir_1)

# Create and save another small dataset to disk
data_2 = {
    "text": ["baz qux", "lorem ipsum"],
    "label": [1, 0]
}
dataset_2 = datasets.Dataset.from_dict(data_2)
dataset_2.save_to_disk(temp_dir_2)

# Define ARGS
ARGS = {
    "data_paths": [temp_dir_1, temp_dir_2]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
datasets — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Dataset — a Dataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Dataset output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_ngram_sentences Not yet run
unverified (harvested, no recorded run)
intuit-ai-research/knowledge-infused-ai/synthetic-knowledge-ingestion/data_generation/utils.py
code served (permissive licence) · get_code("17ab51ddeeed5908")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 later) and 4 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.

FunctionAlso present inEarliest-datedOthers named
normalize_answer 37 other papers
32 dated earlier, 5 later · 1 only as an assembly brick
1808.07042 (2018-08)
CoQA: A Conversational Question Answering Challenge
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1902.01718 (2019-02)
End-to-End Open-Domain Question Answering with BERTserini
and 34 more not named here
get_tokens 25 other papers
21 dated earlier, 4 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1902.01718 (2019-02)
End-to-End Open-Domain Question Answering with BERTserini
1908.08962 (2019-08)
Well-Read Students Learn Better: On the Importance of Pre-training Compact Models
and 22 more not named here
compute_exact 11 other papers
8 dated earlier, 3 later
1902.01718 (2019-02)
End-to-End Open-Domain Question Answering with BERTserini
2004.07347 (2020-04)
HybridQA: A Dataset of Multi-Hop Question Answering over Tabular and Textual Data
2105.02692 (2021-05)
Learning to Perturb Word Embeddings for Out-of-distribution QA
and 8 more not named here

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

Large language models (LLMs) are proficient in capturing factual knowledge across various domains. However, refining their capabilities on previously seen knowledge or integrating new knowledge from external sources remains a significant challenge. In this work, we propose a novel synthetic knowledge ingestion method called Ski, which leverages fine-grained synthesis, interleaved generation, and assemble augmentation strategies to construct high-quality data representations from raw knowledge sources. We then integrate Ski and its variations with three knowledge injection techniques: Retrieval Augmented Generation (RAG), Supervised Fine-tuning (SFT), and Continual Pre-training (CPT) to inject and refine knowledge in language models. Extensive empirical experiments are conducted on various question-answering tasks spanning finance, biomedicine, and open-generation domains to demonstrate that Ski significantly outperforms baseline methods by facilitating effective knowledge injection. We believe that our work is an important step towards enhancing the factual accuracy of LLM outputs by refining knowledge representation and injection capabilities. 1

For agents

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

get_harvested_code_for_paper("2410.09629")
get_code_for_paper("2410.09629")
have("2410.09629")

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

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

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

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

Connect an agent — have() is free.