← Back to Paper Radar

Predict the Retrieval! Test time adaptation for Retrieval Augmented Generation

Xin Sun, Zhongqi Chen, Q. Liu, Shu Wu, Bowen Song, Weiqiang Wang, Zilei Wang, Liang Wang
arXiv.org | 2026

Reading guide · Based on sections of the original paper

The authors propose TTARAG, which adapts an LLM's weights at inference time. For each query, it splits retrieved passages into prefix-suffix pairs and trains the model on suffix prediction before answering, with the aim of improving RAG in specialized domains without labels.

Why read this

Practitioners running RAG over domain corpora can use it to judge whether per-query fine-tuning on retrieved text is worth its latency cost compared with prompting tricks or RAG-pretrained models.

What the authors found

  • Across three 6–8B chat models, TTARAG raised LLM-judged accuracy over naive RAG on BioASQ (+7.0 to +19.4 points) and PubMedQA (+6.4 to +25.0). Gains on CRAG overall were smaller (+2.1 to +3.7). The authors report that CoT beat TTARAG in some Open-domain settings, for example 45.8% vs 41.5% on Llama-3.1-8b-it. 4.4 Experimental Results
  • With a Llama-2-7b-chat backbone, TTARAG scored 30.5% overall on CRAG. The authors report that the general-domain RAG-pretrained models Ret-Robust, RAAT and Self-RAG all fell below plain Llama-2-7b-chat (27.8%), and none had been fine-tuned on the target domains. 4.4 Experimental Results
  • In an ablation, prefix-suffix segmentation beat plain next-token training on whole passages by only 0.4–1.1 points of CRAG overall accuracy. 4.4 Experimental Results

Main limitation

The method adds substantial latency. On one A100 over 2,706 CRAG queries, it averaged 2.45 s per query at 3 pairs, against 0.36 s for naive RAG, which is roughly 7x slower. It was faster only when compared with CoT (4.32 s). 4.4 Experimental Results

Where to start

4.4 Experimental Results · Check the Table 3 baseline comparison, the hyperparameter claims (learning rate 1e-6 to 1e-5, 3–5 pairs) and the timing table to judge the accuracy-latency trade-off.

Abstract

Retrieval-Augmented Generation (RAG) has emerged as a powerful approach for enhancing large language models'question-answering capabilities through the integration of external knowledge. However, when adapting RAG systems to specialized domains, challenges arise from distribution shifts, resulting in suboptimal generalization performance. In this work, we propose TTARAG, a test-time adaptation method that dynamically updates the language model's parameters during inference to improve RAG system performance in specialized domains. Our method introduces a simple yet effective approach where the model learns to predict retrieved content, enabling automatic parameter adjustment to the target domain. Through extensive experiments across six specialized domains, we demonstrate that TTARAG achieves substantial performance improvements over baseline RAG systems. Code available at https://github.com/sunxin000/TTARAG.

Generated automatically from paper sections on 2026-11-28.