The DOI matches its Crossref record; 55 of the 60 references it cites were found in a registry or an index; 9 of the 26 sources its claims cite were checked for support.
In-Context Retrieval-Augmented Language Models
Open accessAbstract
Abstract Retrieval-Augmented Language Modeling (RALM) methods, which condition a language model (LM) on relevant documents from a grounding corpus during generation, were shown to significantly improve language modeling performance. In addition, they can mitigate the problem of factually inaccurate text generation and provide natural source attribution mechanism. Existing RALM approaches focus on modifying the LM architecture in order to facilitate the incorporation of external information, significantly complicating deployment. This paper considers a simple alternative, which we dub In-Context RALM: leaving the LM architecture unchanged and prepending grounding documents to the input, without any further training of the LM. We show that In-Context RALM that builds on off-the-shelf general purpose retrievers provides surprisingly large LM gains across model sizes and diverse corpora. We also demonstrate that the document retrieval and ranking mechanism can be specialized to the RALM setting to further boost performance. We conclude that In-Context RALM has considerable potential to increase the prevalence of LM grounding, particularly in settings where a pretrained LM must be used without modification or even via API access.1
Overview
CoChat Summary
TL;DR
In-Context RALM prepends retrieved documents to a frozen LM’s input without architecture changes or training, and off-the-shelf retrievers yield large perplexity gains across model sizes and corpora. Tailoring document ranking via zero-shot or trained rerankers further improves performance, including on open-domain QA.
Key findings
- With BM25 retrieval (`s = 4`, `ℓ = 32`), In-Context RALM improved LM perplexity enough to match a 2–3× larger model; e.g., 6.7B OPT matched 66B OPT, and 345M GPT-2 + BM25 outperformed 762M GPT-2.
- BM25 outperformed dense retrievers (Contriever, Spider, BERT mean pooling); optimal query length was `ℓ = 32` for BM25 vs. `ℓ = 64` for dense retrievers, and more frequent retrieval (smaller stride) improved performance.
- Predictive reranking improved WikiText-103 word perplexity for GPT-2 110M from 29.6 to 26.8 and GPT-2 1.5B from 16.6 to 15.4; zero-shot reranking also improved over taking the top BM25 document.
- On ODQA with two DPR documents, LLaMA-13B improved NQ exact match from 12.0% to 31.0% and TriviaQA from 54.8% to 60.1%; LLaMA-33B improved NQ from 13.7% to 32.3% and TriviaQA from 58.3% to 62.7%.
Methods
- Evaluated on five LM datasets (WikiText-103, RealNews, ArXiv, Stack Exchange, FreeLaw) and two ODQA datasets (Natural Questions, TriviaQA), using GPT-2 (110M–1.5B), GPT-Neo/GPT-J (1.3B–6B), OPT (125M–66B), and LLaMA (7B–33B) models with max sequence length 1,024.
- Retrieval corpora: Wikipedia (Dec. 20, 2018) for WikiText-103/ODQA with 120 WikiText dev/test articles removed; training data for other datasets; non-overlapping 100-word passages truncated at 256 tokens. Retrievers: BM25, BERT mean pooling, Contriever, Spider; DPR for ODQA.
- Main analyses measured perplexity on LM datasets and exact match on ODQA; reranking used top-16 BM25 documents, with zero-shot LM reranking and a RoBERTa-base predictive reranker trained for 10,000 steps (peak LR 1e-5, batch 32, 300,000 WikiText-103 examples).
Limitations
- Stated: the paper considers only prepending a single external document; adding more documents could drive further gains. It retrieves every fixed interval of `s` tokens, and future work could retrieve more sparsely (e.g., when a specialized model predicts retrieval is needed) for latency/cost gains.
- Stated: predictive reranking still leaves room compared with top-16 BM25 oracle results; oracle could improve with `k > 16` or stronger RALM-dedicated retrievers.
- Evident: main LM experiments use one document and max sequence length 1,024 despite some models supporting 2,048; the predictive reranker assumes availability of training data from the target corpus and was trained on WikiText-103.
Model-written summary. Check it against the paper before relying on it.
Integrity signals
Registry
Cites
Statistics
Figures










Verification
Claims the paper makes
5 Valid · 4 Not valid · 9 Not checked · 43 Own results and interpretations
The cited sources support only part of this claim — read each source’s verdict below.
In the paper
“Their results are based on training a dedicated retriever for language modeling.”
§ In-Context Retrieval-Augmented Language Models > 1 Introduction
What the sources say
- Partly supportedcites Shi et al., 2023 sourceExperimental — accuracy not yet measured
Section 4 describes training a retriever with language-model supervision for REPLUG LSR, and Section 5.2 gives its training procedure. But the ‘Our model’ results also include REPLUG without that retriever training, so training a dedicated retriever underlies only part of the reported results. The indexed passages provide no page numbers. (LLM, conf=0.88)
plainstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Partly supported
The cited sources support only part of this claim — read each source’s verdict below.
In the paper
“More importantly, they tend to produce factual inaccuracies and errors (Lin et al., 2022;Maynez et al., 2020;Huang et al., 2020).”
§ In-Context Retrieval-Augmented Language Models > 1 Introduction
What the sources say
- Supportedcites Lin et al., 2022 source
The Introduction (p. 1) explicitly says that recent language models have a tendency to generate false statements, ranging from subtle inaccuracies to hallucinations. The Discussion (p. 8) also reports poor performance by the baseline models on truthfulness questions. (LLM, conf=0.94)
- Partly supportedcites Maynez et al., 2020 sourceExperimental — accuracy not yet measured
Section 5.3 reports that over 90% of hallucinations from the BERTS2S summarization model are erroneous, and the Abstract reports substantial hallucinated content across the evaluated summarization systems. This supports factual errors in those systems, but the claim extends the finding to language models generally, which the paper did not evaluate. (LLM, conf=0.83)
- Partly supportedcites Huang et al., 2020 sourceExperimental — accuracy not yet measured
Section 2.3 (p. 10) says generation-based dialog methods often produce undesirable responses that are ungrammatical or irrelevant, supporting the general point about errors. Section 3.2 (p. 12) stresses grounding responses in real-world facts, but the passages do not establish that language models tend to produce factual inaccuracies specifically; the paper discusses open-domain dialog systems rather than LMs generally. (LLM, conf=0.78)
plain- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Supported
The cited sources support only part of this claim — read each source’s verdict below.
In the paper
“Existing RALM approaches focus on modifying the LM architecture in order to facilitate the incorporation of external information, significantly complicating deployment.”
- Also stated in: § 1 Introduction · plain
“Leading RALM systems introduced recently tend to be focused on altering the language model architecture (Khandelwal et al., 2020;Borgeaud et al., 2022;Zhong et al., 2022;Levine et al., 2022c;Li et al., 2022).”
§ In-Context Retrieval-Augmented Language Models > Abstract
What the sources say
- Not matchedcites Khandelwal et al., 2020
Couldn’t be matched to a paper in Crossref, so it can’t be checked.
- Not matchedcites Borgeaud et al., 2022
Couldn’t be matched to a paper in Crossref, so it can’t be checked.
- Partly supportedcites Zhong et al., 2022 sourceExperimental — accuracy not yet measured
The Introduction and §2.2 Memory Augmentation say that several earlier approaches modify Transformer architectures to incorporate memory from previous segments. They do not establish that existing retrieval-augmented language modeling approaches generally focus on architecture changes, or that those changes significantly complicate deployment. (LLM, conf=0.84)
plainstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Also stated in: § 1 Introduction · plain
The cited sources that could be checked couldn’t confirm or dispute this claim.
In the paper
“All prior work involves training the LM.”
§ In-Context Retrieval-Augmented Language Models > Nearest Neighbor Language Models
What the sources say
- Not matchedcites Lewis et al., 2020
Couldn’t be matched to a paper in Crossref, so it can’t be checked.
- Could not verifycites Izacard and Grave, 2021 sourceExperimental — accuracy not yet measured
The Related work section (p. 2) describes earlier retrieval-augmented QA systems but does not say whether all of them train the language model. The Experiments section (p. 4) says this paper fine-tunes its own pretrained T5 model; that does not establish the claim about all prior work. I searched for discussion of training or freezing the language model in earlier retrieve-and-read systems. (LLM, conf=0.72)
- Not matchedcites Borgeaud et al., 2022
Couldn’t be matched to a paper in Crossref, so it can’t be checked.
plain- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Not matched
The cited sources support only part of this claim — read each source’s verdict below.
In the paper
“While they showed significant gains from kNN-LM, the approach requires storing the representations for each token in the corpus, an expensive requirement even for a small corpus like Wikipedia.”
§ In-Context Retrieval-Augmented Language Models > Nearest Neighbor Language Models
What the sources say
- Partly supportedcites Zhong et al., 2022 sourceExperimental — accuracy not yet measured
Section 2.2 defines external memory as context–token pairs from a corpus and says that accessing a memory of roughly 10^8 entries is computationally expensive. The Introduction identifies kNN-LM as using external memory, and Table 2 notes large SSD storage for one retrieval setup. The paper tests on WIKITEXT-103, but these passages do not characterize Wikipedia itself as a small corpus or establish the claimed storage cost for it. (LLM, conf=0.82)
plainstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Partly supported
42 more claims
Create a free account to see all 61 claims and to verify the 2 references still open.
- Probably not a substantial claim. 9
- The quote only partly states this claim. 3
- It may state two separate claims as one. 4
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
The source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“or when language models are augmented with external information (relevant documents from a search engine, database query results, etc.; Petroni et al., 2020;Ram et al., 2023;Shi et al., 2023;Mallen et al., 2023;Schick et al., 2023, inter alia).”
From Lost in the Middle: How Language Models Use Long Contexts (2024) · cites this paper as Ram et al., 2023
Experimental — accuracy not yet measuredThe source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“In contrast to fine-tuning, RAG does not seek to adjust the internal parameters (or internal memory) of an LLM.”
From ChatGPT, extended: large language models and the extended mind (2025) · cites this paper as Ram et al., 2023
Experimental — accuracy not yet measuredThe source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“the task of retrieving relevant and precise information from extensive corpora can be computationally demanding and resourceintensive, necessitating continuous updating and modification of knowledge databases to keep pace with the latest information (Chen et al. 2023; Siriwardhana et al. 2023; Ram et al. 2023; Cheng et al. 2024).”
From Large Legal Fictions: Profiling Legal Hallucinations in Large Language Models (2024) · cites this paper as Ram et al. 2023
Experimental — accuracy not yet measuredThe source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“Memory-augmented methods extend this concept by retrieving user-specific information from past interactions. This addresses the challenge of a limited context window and enables the integration of past information into the input prompt [25, 29, 45].”
From CAIM: Development and Evaluation of a Cognitive AI Memory Framework for Long-Term Interaction with Intelligent Agents (2026) · cites this paper as [45]
Experimental — accuracy not yet measuredThe source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“Despite their capabilities, LLMs still have shortcomings, such as a limited context window, which restricts the amount of information that can be processed and thus the ability to understand the ever-changing environment [58, 60] and maintain effective long-term interactions [45, 50].”
From CAIM: Development and Evaluation of a Cognitive AI Memory Framework for Long-Term Interaction with Intelligent Agents (2026) · cites this paper as [45]
Experimental — accuracy not yet measured
9 more claims about this paper
Create a free account to see every claim other papers make about this one.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
Each contradiction between two passages listed here was confirmed by an independent check.
Rated minor: it would not touch a result — a value no result rests on, a p-value that stays on the same side of the significance level, or a conflict that is clerical, resolved elsewhere in the paper, or outside its own findings.
In the paper
§ In-Context Retrieval-Augmented Language Models > 8 Discussion
“this paper considers only the case of prepending a single external document to the context”
§ In-Context Retrieval-Augmented Language Models > 7 In-Context RALM for Open-Domain Question Answering
“In the open-book setting, we include the top two documents returned by DPR.”
Rated minor: it would not touch a result — a value no result rests on, a p-value that stays on the same side of the significance level, or a conflict that is clerical, resolved elsewhere in the paper, or outside its own findings.
In the paper
§ In-Context Retrieval-Augmented Language Models > Nearest Neighbor Language Models
“All prior work involves training the LM.”
§ In-Context Retrieval-Augmented Language Models > Nearest Neighbor Language Models
“Levine et al. (2022a) showed competitive open domain question-answering performance by prompt-tuning a frozen LM as a reader.”
Rated minor: it would not touch a result — a value no result rests on, a p-value that stays on the same side of the significance level, or a conflict that is clerical, resolved elsewhere in the paper, or outside its own findings.
In the paper
§ In-Context Retrieval-Augmented Language Models > Model
“Table 3 shows that a small LM (GPT-2 117M) can be used to rerank the documents for all larger GPT-2 models”
§ In-Context Retrieval-Augmented Language Models > Model
“GPT-2 345M (M) GPT-2 110M (S) 20.8 12.1”
Citations
Cites
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017) · arXiv · doi:10.48550/arxiv.1706.03762 · Cited by 120,404
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019) · Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) · doi:10.18653/v1/n19-1423 · Cited by 54,325
Language Models are Few-Shot Learners
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. (2020) · arXiv · doi:10.48550/arxiv.2005.14165 · Cited by 23,372
RoBERTa: A Robustly Optimized BERT Pretraining Approach
Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., & Stoyanov, V. (2019) · arXiv · doi:10.48550/arxiv.1907.11692 · Cited by 16,515
Advances in neural information processing systems 7
(1996) · Computers & Mathematics with Applications · doi:10.1016/s0898-1221(96)90463-0 · Cited by 14,281
Advances in Neural Information Processing Systems 29
Teymur, O., Zygalakis, K., & Calderhead, B. (2016) · Cited by 13,887
Transformers: State-of-the-Art Natural Language Processing
Wolf, T., Debut, L., Sanh, V., Chaumond, J., Delangue, C., Moi, A., Cistac, P., Rault, T., Louf, R., Funtowicz, M., et al. (2020) · Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations · doi:10.18653/v1/2020.emnlp-demos.6 · Cited by 8,741
LLaMA: Open and Efficient Foundation Language Models
Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.-A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., Azhar, F., et al. (2023) · arXiv · doi:10.48550/arxiv.2302.13971 · Cited by 4,602
Billion-scale similarity search with GPUs
Johnson, J., Douze, M., & Jegou, H. (2021) · IEEE Transactions on Big Data · doi:10.1109/tbdata.2019.2921572 · Cited by 4,228 · cited 1×
“For dense retrieval, we applied exact search using FAISS (Johnson et al., 2021).”
MethodBillion-scale similarity search with GPUs
Johnson, J., Douze, M., & Jégou, H. (2017) · arXiv · doi:10.48550/arxiv.1702.08734 · Cited by 4,140
Research works printed but not linked: 1
- Levine, 2022, Huge frozen language models as readers for open-domain question answering
Cited by
Huang, L., Yu, W., Ma, W., Zhong, W., Feng, Z., Wang, H., Chen, Q., Peng, W., Feng, X., Qin, B., et al. (2025) · ACM Transactions on Information Systems · doi:10.1145/3703155 · Cited by 4,688
Lost in the Middle: How Language Models Use Long Contexts
Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F., & Liang, P. (2023) · arXiv · doi:10.48550/arxiv.2307.03172 · Cited by 1,599
Lost in the Middle: How Language Models Use Long Contexts
Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F., & Liang, P. (2024) · Transactions of the Association for Computational Linguistics · doi:10.1162/tacl_a_00638 · Cited by 1,612
A Comprehensive Overview of Large Language Models
Naveed, H., Khan, A. U., Qiu, S., Saqib, M., Anwar, S., Usman, M., Akhtar, N., Barnes, N., & Mian, A. (2023) · arXiv · doi:10.48550/arxiv.2307.06435 · Cited by 1,259
A Comprehensive Overview of Large Language Models
Naveed, H., Khan, A. U., Qiu, S., Saqib, M., Anwar, S., Usman, M., Akhtar, N., Barnes, N., & Mian, A. (2025) · ACM Transactions on Intelligent Systems and Technology · doi:10.1145/3744746 · Cited by 1,257
“This paper will serve as a valuable resource for researchers, offering insights into the recent advancements in LLMs and providing fundamental concepts and details to develop improved LLMs.”
Metadata
- Authors
- Ram, O., Levine, Y., Dalmedigos, I., Muhlgay, D., Shashua, A., Leyton-Brown, K., & Shoham, Y.
- Affiliations
- AI21 Labs, Israel. orir@ai21.com
- AI21 Labs, Israel. yoavl@ai21.com
- AI21 Labs, Israel. itayd@ai21.com
- AI21 Labs, Israel. dorm@ai21.com
- AI21 Labs, Israel. amnons@ai21.com
- AI21 Labs, Israel. kevinlb@ai21.com
- AI21 Labs, Israel. yoavs@ai21.com
- Corresponding author
- Ram, Ori
- Levine, Yoav
- Dalmedigos, Itay
- Muhlgay, Dor
- Shashua, Amnon
- Shoham, Yoav
- Venue
- Transactions of the Association for Computational Linguistics
- Publisher
- MIT Press
- Published
- 2023
- Volume
- 11
- Pages
- 1316-1331
- ISSN
- 2307-387X (ISSN-L)
- OpenAlex
- W4388778348
- Cited by
- 449
- References
- 55
- Citations by year
- 2026: 160 · 2025: 189 · 2024: 80 · 2023: 20
- FWCI
- 42.21
- Type
- journal article
- Language
- en
- Open access
- diamond
- doi.org
- Locations
- Transactions of the Association for Computational Linguistics (publishedVersion, cc-by)
- arXiv (Cornell University) (submittedVersion, public-domain)
- DOAJ (DOAJ: Directory of Open Access Journals) (submittedVersion, cc-by-sa)
- arXiv (Cornell University) (public-domain)
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Information Systems › Information Retrieval and Search Behavior
- Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
- Keywords
- retrieval-augmented language models, document retrieval, document ranking, factual accuracy, source attribution, pre-trained language models, large language models
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
The claim verdicts this report counts are experimental: their accuracy is not yet measured.
A language model drew the claims from the paper on 2026-10-10, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).
A second model labelled each claim on 2026-10-10 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).
Cited sources are checked with a language model’s help (gpt-6-sol).
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
How to cite
Cite CoChat for the checks on this page, and the paper for its own findings.
- This page
- CoChat. (2026). Citation check: In-Context Retrieval-Augmented Language Models. https://app.cochat.ai/papers/10.1162/tacl_a_00605
- The paper
- Ram, O., Levine, Y., Dalmedigos, I., Muhlgay, D., Shashua, A., Leyton-Brown, K., & Shoham, Y. (2023). In-Context Retrieval-Augmented Language Models. Transactions of the Association for Computational Linguistics. https://doi.org/10.1162/tacl_a_00605
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.