OpenViSTAI · Agents · Blockchain · Crypto
Menu
RAG & Knowledge Systems

Longrag

Longrag is a Python research repository for retrieval-augmented generation with long-context language models. It combines a long retriever that searches grouped document units with a long reader that extracts answers from those larger contexts.

Independent OpenViST project profile, based on linked sources.

Longrag — OpenViST project profile in RAG & Knowledge Systems.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Longrag when you want research code for experimenting with larger retrieval units and long-context reading in a RAG pipeline, especially for question-answering over document collections.

Who it is for

  • Researchers studying retrieval-augmented generation with long-context language models.
  • Developers prototyping long-document question-answering systems or comparing retrieval-unit sizes.

Documented uses

  • Build a prototype that retrieves grouped long documents and uses a long-context reader to answer questions.
  • Load the released NQ or HotpotQA retrieval corpus for experiments.
  • Prepare a Wikipedia-derived retrieval corpus using the repository's cleaning, processing and grouping scripts.
  • Run dense retrieval experiments using the documented Tevatron and bge-large-en-v1.5 setup.
Before you choose

Requirements & limits

The public GitHub repository is licensed under MIT.

  • The framework uses retrieval units of about 4,000 tokens, described as roughly 30 times longer than the short units discussed in the README.
  • The retrieval code uses Tevatron and bge-large-en-v1.5; its sample script may require local dataset path and GPU-count changes.
  • The README names Gemini-1.5-Pro and GPT-4o as long-reader choices.
  • The repository includes released retrieval corpora for NQ and HotpotQA, so corpus construction is optional for those datasets.
  • The project README says the repository is still being polished.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install the Longrag repository

Clone the code and install its listed Python packages.

Before you start

  • Git
  • Python and pip

Steps

  1. Clone https://github.com/TIGER-AI-Lab/LongRAG.git.

  2. Change into the LongRAG directory.

  3. Run pip install -r requirements.txt.

Expected outcome

The repository is cloned and its requirements are installed.

Guide limitations

  • This covers installation only; the README directs users to the Long Reader section for prediction instructions.
Source-based practical guide

Load a released retrieval corpus

Load the provided NQ or HotpotQA corpus with the Hugging Face datasets library.

Before you start

  • Python
  • The datasets library

Steps

  1. Import load_dataset from datasets.

  2. Load TIGER-Lab/LongRAG with the nq_corpus configuration for NQ, or hotpot_qa_corpus for HotpotQA.

Expected outcome

The selected released retrieval corpus is available as a dataset object in the Python session.

Guide limitations

  • The README documents these retrieval corpus configurations; this does not cover running retrieval or reader inference.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
15 October 2026
Original website title
TIGER-AI-Lab/LongRAG · Official homepage title · retained in its source language