Practical overview
When it fits
Use Dyprag when you need research code for experimenting with document-derived parameterized knowledge during language-model inference, and can work with the associated model and retrieval-data setup.
Who it is for
- Researchers studying retrieval-augmented generation and test-time knowledge enhancement
- Developers prototyping parameterized retrieval or comparing RAG methods
- Practitioners exploring interpretability experiments for parametric retrieval
Documented uses
- Prototype a dynamic parametric RAG pipeline for test-time knowledge enhancement.
- Compare DyPRAG inference with a vanilla language-model baseline.
- Evaluate outputs using the repository's RAGTruth evaluation instructions.
- Adapt model-specific code to support another language model.
Requirements & limits
The public repository lists an Apache-2.0 license.
- The documented environment uses Python 3.10.4, Conda and dependencies from requirements.txt.
- The BM25 data-preparation route uses a Wikipedia passage dump and Elasticsearch 8.15.0.
- The README describes dyprag and dyprag_combine inference modes and a separate RAGTruth evaluation script.
- Adapting the implementation to another language model requires adding model files and modifying model-loading and forward-pass code.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare the documented Python environment
Create the Conda environment and install the repository's Python dependencies.
Before you start
- A local checkout of the Dyprag repository
- Conda
Steps
Change into the DyPRAG repository directory.
Create a Conda environment named dyprag with Python 3.10.4.
Activate the dyprag environment.
Install dependencies from requirements.txt with pip.
Expected outcome
A Conda environment with the repository's declared Python dependencies installed.
Guide limitations
- These setup instructions do not cover data preparation, model weights or running inference.
Prepare a Wikipedia BM25 retrieval index
Download the specified Wikipedia passage dump and build an Elasticsearch index using the repository's preparation script.
Before you start
- The DyPRAG repository and its Python environment
- Elasticsearch 8.15.0
- The Wikipedia passage dump from the DPR data source
Steps
Download the psgs_w100.tsv.gz Wikipedia dump into data/dpr and decompress it.
Download and extract Elasticsearch 8.15.0, then start Elasticsearch in the background as shown in the README.
From the repository directory, run prep_elastic.py with the dump path data/dpr/psgs_w100.tsv and index name wiki.
Expected outcome
The README's specified Wikipedia passage data is indexed in Elasticsearch under the name wiki.
Guide limitations
- This recipe covers retrieval-index preparation only; it does not prepare benchmark datasets or run DyPRAG inference.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 14 October 2026
- Original website title
- Trae1ounG/DyPRAG · Official homepage title · retained in its source language

