Dynamic Parametric Retrieval Augmented Generation for Test-time Knowledge Enhancement

Yuqiao Tan, Shizhu He, Huanxuan Liao, Jun Zhao, Kang Liu
3/31/2025
37 citations
cs.CLcs.AI
rag

Official code: Trae1ounG/DyPRAG (187 stars, Python, Apache-2.0, last commit 2025-08-14).

Abstract

Retrieval-augmented generation (RAG) enhances large language models (LLMs) by retrieving relevant documents from external sources and incorporating them into the context. While it improves reliability by providing factual texts, it significantly increases inference costs as context length grows and introduces challenging issue of RAG hallucination, primarily caused by the lack of corresponding parametric knowledge in LLMs.

Show full abstract

An efficient solution is to enhance the knowledge of LLMs at test-time. Parametric RAG (PRAG) addresses this by embedding document into LLMs parameters to perform test-time knowledge enhancement, effectively reducing inference costs through offline training. However, its high training and storage costs, along with limited generalization ability, significantly restrict its practical adoption. To address these challenges, we propose Dynamic Parametric RAG (DyPRAG), a novel framework that leverages a lightweight parameter translator model to efficiently convert documents into parametric knowledge. DyPRAG not only reduces inference, training, and storage costs but also dynamically generates parametric knowledge, seamlessly enhancing the knowledge of LLMs and resolving knowledge conflicts in a plug-and-play manner at test-time. Extensive experiments on multiple datasets demonstrate the effectiveness and generalization capabilities of DyPRAG, offering a powerful and practical RAG paradigm which enables superior knowledge fusion and mitigates RAG hallucination in real-world applications. Our code is available at https://github.com/Trae1ounG/DyPRAG.

View on arXivView PDF

Code Implementations(1)

Trae1ounG/DyPRAGOfficial100%
Apache-2.0

[arxiv: 2503.23895] Dynamic Parametric Retrieval Augmented Generation for Test-time Knowledge Enhancement

18719Python, ShellMar 26, 20251 years agoApache-2.0
llmllm-inferencellms-reasoningopen-sourcepaper+1 more

Similar Papers

Cite this paper

@article{tan2025dynamic,
  title  = {Dynamic Parametric Retrieval Augmented Generation for Test-time Knowledge Enhancement},
  author = {Yuqiao Tan and Shizhu He and Huanxuan Liao and Jun Zhao and Kang Liu},
  year   = {2025},
  eprint = {2503.23895},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.23895v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.23895.svg)](https://codeofpaper.com/paper/2503.23895)

Discussion