SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.09955 · ICLR · 2024

Knowledge Card: Filling LLMs' Knowledge Gaps with Plug-in Specialized Language Models

Vidhisha Balachandran, Yulia Tsvetkov, Shangbin Feng, Yuyang Bai, Weijia Shi, Tianxing He

arXiv · PDF · Open in the Atlas

Code that ran

3 of 8 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/2305.09955.json · badge: /api/ran/2305.09955.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
bunsenfeng/knowledge_card canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
BunsenFeng/Knowledge_Card canonical (classifier label)
classifier basis: classifier_2025
0 ran · 2 no recorded run
FunctionStatusWhere it lives
get_tokens Ran
ran; our contract draft was wrong, not the code
bunsenfeng/knowledge_card/eval_datasets/MidtermQA/odqa_utils.py
code served (permissive licence) · get_code("496046a8354a8130")
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 list, 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 re
import string

puncs = list(string.punctuation)

def normalize_answer(s):

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

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

    def remove_punc(text):
        exclude = set(puncs)
        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 get_tokens(s):
    if not s:
        return []
    return normalize_answer(s).split()

# Setup code
ARGS = {
    "s": "The quick brown fox jumps over the lazy dog!"
}
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 list, ndim 1, dtype family float — a list 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
most_common Ran
ran; our contract draft was wrong, not the code
bunsenfeng/knowledge_card/eval_datasets/MidtermQA/odqa_utils.py
code served (permissive licence) · get_code("2ed51eac60e5be2a")
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.

from collections import Counter

def most_common(lst):
    data = Counter(lst)
    return max(lst, key=data.get)

# Setup code
ARGS = {
    "lst": [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]
}
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
normalize_answer Ran
ran; our contract draft was wrong, not the code
bunsenfeng/knowledge_card/eval_datasets/MidtermQA/odqa_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from colinzhaoust/fact-and-reflection, is pointer only (licence: NONE) · get_code("55e919890251f878")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from colinzhaoust/fact-and-reflection, 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.

group_texts Not yet run
unverified (harvested, no recorded run)
BunsenFeng/Knowledge_Card/card_training.py
code served (permissive licence) · get_code("c6d0a4b8c23ebfe9")
How it ran

no invocation recorded.

llm_response Not yet run
unverified (harvested, no recorded run)
bunsenfeng/knowledge_card/lm_utils.py
code served (permissive licence) · get_code("71f1d0c03fccca6b")
How it ran

no invocation recorded.

similarity_filter Not yet run
unverified (harvested, no recorded run)
bunsenfeng/knowledge_card/similarity.py
code served (permissive licence) · get_code("57690eb4fd31b813")
How it ran

no invocation recorded.

summarize Not yet run
unverified (harvested, no recorded run)
bunsenfeng/knowledge_card/pruning.py
code served (permissive licence) · get_code("94ba717ec9375d06")
How it ran

no invocation recorded.

tokenize_function Not yet run
unverified (harvested, no recorded run)
BunsenFeng/Knowledge_Card/card_training.py
code served (permissive licence) · get_code("add928626b7e8654")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 3 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 3 later) and 5 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
get_tokens 25 other papers
11 dated earlier, 13 later, 1 same year, order not determinable
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
most_common 3 other papers
1 the same month, 2 later
2305.18395 (2023-05)
Knowledge-Augmented Reasoning Distillation for Small Language Models in Knowledge-Intensive Tasks
2310.04408 (2023-10)
RECOMP: Improving Retrieval-Augmented LMs with Compression and Selective Augmentation
2406.12208 (2024-06)
Knowledge Fusion By Evolving Weights of Language Models
normalize_answer 2 other papers
2 later
2310.04408 (2023-10)
RECOMP: Improving Retrieval-Augmented LMs with Compression and Selective Augmentation
2402.17124 (2024-02)
Fact-and-Reflection (FaR) Improves Confidence Calibration of Large Language Models

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

Repositories linked to this paper

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

Abstract

By design, large language models (LLMs) are static general-purpose models, expensive to retrain or update frequently. As they are increasingly adopted for knowledge-intensive tasks, it becomes evident that these design choices lead to failures to generate factual, relevant, and up-to-date knowledge. To this end, we propose KNOWLEDGE CARD, a modular framework to plug in new factual and relevant knowledge into general-purpose LLMs. We first introduce knowledge cards-specialized language models trained on corpora from specific domains and sources. Knowledge cards serve as parametric repositories that are selected at inference time to generate background knowledge for the base LLM. We then propose three content selectors to dynamically select and retain information in documents generated by knowledge cards, specifically controlling for relevance, brevity, and factuality of outputs. Finally, we propose two complementary integration approaches to augment the base LLM with the (relevant, factual) knowledge curated from the specialized LMs. Through extensive experiments, we demonstrate that KNOWLEDGE CARD achieves state-of-the-art performance on six benchmark datasets. Ultimately, KNOWLEDGE CARD framework enables dynamic synthesis and updates of knowledge from diverse domains. Its modularity will ensure that relevant knowledge can be continuously updated through the collective efforts of the research community. 1

For agents

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

get_harvested_code_for_paper("2305.09955")
get_code_for_paper("2305.09955")
have("2305.09955")

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

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

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

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

Connect an agent — have() is free.