SELF-RAG: Self-Reflective Retrieval-Augmented Generation for Language Models

RepositoryAkariAsai/self-ragResearch

SELF-RAG is an open-source framework designed to train language models to adaptively retrieve external passages, generate responses, and critique their own outputs using fine-grained reflection tokens.

Key points

  1. On-demand retrieval: The model learns dynamically whether to retrieve multiple times, once, or skip retrieval entirely.
  2. Critique via reflection tokens: Special tokens evaluate factual accuracy and passage relevance as an integral part of generation.
  3. Segment-wise beam search: Selects generated text segments to balance custom preferences and utility scores.
  4. Pretrained checkpoints: 7B and 13B models based on LLaMA 2 are published on the Hugging Face Hub.
  5. Inference acceleration: Recommends and utilizes vLLM for high-throughput inference.

Why it matters

Standard RAG methods indiscriminately fetch passages regardless of query necessity, risking irrelevant context and degraded answers. SELF-RAG introduces selective querying and embedded self-verification directly into model generation.

Analysis

Originating from an ICLR 2024 top 1% oral paper, this repository provides complete research artifacts including code, training datasets, and pretrained checkpoints. It utilizes Python and vLLM on top of LLaMA 2 architectures. The framework is targeted at ML researchers and engineers exploring next-generation RAG pipelines. While mature for academic reproduction and baseline evaluations, operationalising it requires custom adaptation rather than off-the-shelf production deployment.

Summary generated by AI (Gemini 3.8 Flash, 27 September 2026). It may contain errors – the original source is authoritative.

Similar in content, found by the AI search.

  • Repository:HuskyInSalt/CRAG

    CRAG: Corrective Retrieval Augmented Generation for Robust LLM Outputs

    CRAG (Corrective Retrieval Augmented Generation) is an open-source research framework designed to improve RAG reliability. It evaluates the quality of retrieved context using a lightweight evaluator and triggers corrective actions, such as web searches or text filtering, when confidence is low.

    469starsPython

    AI & LLMs· Research

  • Repository:OpenSPG/KAG

    OpenSPG/KAG: Logic-Form Guided Reasoning and Retrieval Beyond Standard RAG

    KAG (Knowledge Augmented Generation) is an open-source framework combining LLMs with the OpenSPG engine. It aims to address the limitations of vector similarity in standard RAG and noise in OpenIE-based GraphRAG for domain-specific applications.

    9kstarsPython

    AI & LLMs· Tool

  • Repository:OSU-NLP-Group/HippoRAG

    HippoRAG 2: Neurobiologically Inspired Memory Framework for LLMs

    HippoRAG (now in version 2) is an open-source memory framework for LLMs developed by the OSU NLP Group, combining knowledge graphs and Personalized PageRank to mimic human long-term memory across external documents.

    4kstarsPython

    AI & LLMs· Research

  • Repository:hhhuang/CAG

    Cache-Augmented Generation (CAG): A KV-Cache Alternative to RAG

    The CAG open-source repository introduces Cache-Augmented Generation as an alternative to Retrieval-Augmented Generation (RAG). By preloading the entire knowledge base into the context window and reusing the precomputed KV cache, it bypasses real-time document retrieval entirely.

    1.5kstarsPython

    AI & LLMs· Resource

  • Repository:ShenSeanChen/launch-agentic-rag

    launch-agentic-rag: FastAPI Backend for Agentic RAG with Tool Calling

    An open-source repository providing a reference implementation of Agentic RAG using FastAPI. The project extends standard retrieval workflows with autonomous reasoning loops and external tool execution, such as calendar scheduling and email dispatch.

    43starsPython

    AI & LLMs· Tool

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.