arXiv(opens in a new tab)cs.CLSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.17346

Where Should a Document Live: Context, Representations, or Parameters?

Nathanaël Carraz Rakotonirina, Momchil Hardalov, Gonzalo Iglesias, Adrià de Gispert

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

To answer questions outside of their pre-training data, large language models (LLMs) need access to new information, which can be presented in the context window as documents, encoded into the model's parameters, or injected as latent representations. However, each of these methods comes with different efficiency, cost, and performance trade-offs, with no single winner. We present a controlled comparison of representation-based (KV-cache based) and parametric (fine-tuning-based) adaptation methods on five knowledge-intensive benchmarks. We show that in the oracle setting, Cartridges (KV) are the most accurate injection method at nearly every storage budget, outperforming parametric methods by 10 points. Compaction (KV) matches Cartridges only at low compression rates, lagging behind the parametric methods by 10 points at rates higher than 50×50\times. In the more realistic multi-document retrieval scenario, Cartridges are the only method that matches in-context learning (ICL), leading the parametric methods by 29 points and Compaction by 15 points. Nonetheless, Cartridges are also the only method, besides full fine-tuning and large MLP adapters, that suffers from catastrophic forgetting, i.e., a 6% performance degradation on control benchmarks, with 13% in coding.

1 Introduction

Large language models (LLMs) often need additional information, such as enterprise knowledge bases, patient records, or legal corpora to answer questions that were not part of their training data. Techniques such as in-context learning (Brown et al., 2020, ICL) and retrieval-augmented generation (Lewis et al., 2020, RAG) offer a straightforward solution by placing the document in the context window. However, they are bounded by the context length and require re-processing the entire document for every query.

Knowledge injection methods, on the other hand, encode the documents once into compact adapters, replacing the textual context during inference (Eyuboglu et al., 2025; Su et al., 2025; Caccia et al., 2025). These methods fall into two families: Representation-based methods, which incorporate the document into a compressed key-value (KV) cache prefix (e.g. Cartridges (Eyuboglu et al., 2025) and Compaction (Zweiger et al., 2026)); and Parametric methods, which encode the knowledge into the model parameters (e.g. full fine-tuning, LoRA (Hu et al., 2022), or MLP adapters (Houlsby et al., 2019)). Throughout the paper we use adapters as an umbrella term for both KV caches and model weights.

Even though these methods are widely used in practice, prior work mainly evaluates question-answering (QA) tasks over Wikipedia documents that the model has likely already seen in pre-training, therefore testing recall rather than genuinely encoding new knowledge (Ovadia et al., 2024; Su et al., 2025). Eyuboglu et al. (2025) takes a step towards a fairer comparison between parameter-based and representation-based methods, but it covers only a limited set of methods and in a single-document setting. In contrast, in our work we compare head-to-head five state-of-the-art adaptation approaches on five knowledge-intensive tasks, both in the single-document and in the more realistic multi-document retrieval setting. Moreover, we quantify catastrophic forgetting on representative control benchmarks (math, instruction following, general knowledge, coding) and perform a storage-matched and runtime analysis of each method. Our analysis reveals that there is no single best method, and which method to use will depend on the use case. Our main contributions are the following:

• We present a holistic, controlled comparison of different knowledge injection methods:

(i) representation-based (Cartridges, Compaction); and (ii) parametric (LoRA, MLP adapters, full fine-tuning) on knowledge-intensive tasks in both single- and multiple-document settings.

• We study how adapter (KV caches or weights) size influences model performance and catastrophic forgetting, quantifying the trade-off for each knowledge injection method.

• We show that adapter composition in a multi-document retrieval setting is possible under certain conditions, but it remains challenging.

References (35)