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

Logicrag

LogicRAG is a Python retrieval-augmented generation system that derives a logic-dependency graph from a question and uses it to guide multi-step retrieval over a corpus, without requiring a prebuilt knowledge graph of that corpus.

Independent OpenViST project profile, based on linked sources.

Logicrag — 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 LogicRAG when a question benefits from linked retrieval steps and you want to guide retrieval from the question's structure rather than depend on a prebuilt graph of the corpus.

Who it is for

  • Developers implementing corpus-based question answering with multi-step retrieval.
  • Researchers evaluating retrieval-augmented generation across datasets and corpora.

Documented uses

  • Plan retrieval steps for complex questions by identifying dependencies among their subproblems.
  • Run one question against a supplied corpus and inspect the answer, retrieved contexts and reasoning-round count.
  • Evaluate the approach over a dataset while setting reasoning-round, top-context and question-limit parameters.
Before you choose

Requirements & limits

The repository is public and licensed under GPL-3.0. The documented setup requires Python dependencies and an OpenAI API key.

  • The method constructs query logic dependency graphs; it does not require precomputed knowledge graphs over the corpus.
  • Graph pruning schedules retrieval work, and rolling memory is used to manage context length.
  • The README documents both a single-question command and a dataset-evaluation command.
  • OpenAI is the documented API provider; alternate-provider use would require modification and is not demonstrated.

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

Run a dataset evaluation

Evaluate LogicRAG over a supplied question dataset and corpus.

Before you start

  • Python environment with the repository dependencies installed using pip install -r requirements.txt.
  • OpenAI API key configured in a .env file as OPENAI_API_KEY=your_api_key_here.
  • Dataset and corpus JSON files.

Steps

  1. Install dependencies with the command below.

    Documented command
    pip install -r requirements.txt
  2. Set the OpenAI API key in a root .env file.

  3. Run the command below.

    Documented command
    python run.py --model logic-rag --dataset path/to/dataset.json --corpus path/to/corpus.json --max-rounds 5 --top-k 3

Expected outcome

Runs dataset evaluation with a maximum of five reasoning rounds and three top contexts; the `--limit` option can cap question count, with 0 documented to process the full dataset.

Guide limitations

  • The README specifies JSON dataset and corpus paths but does not define their schema in the documented instructions.
  • The documented setup uses OpenAI; another provider is not demonstrated.
Source-based practical guide

Ask one question over a corpus

Use the documented command-line path to submit a single question against a corpus.

Before you start

  • Python environment with repository dependencies installed.
  • OpenAI API key configured in a root .env file.
  • A corpus JSON file.

Steps

  1. Install dependencies with the command below.

    Documented command
    pip install -r requirements.txt
  2. Configure OPENAI_API_KEY in the root .env file.

  3. Run the command below.

    Documented command
    python run.py --model logic-rag --question "Your question here" --corpus path/to/corpus.json --max-rounds 5 --top-k 3

Expected outcome

Submits one question for LogicRAG processing with the specified round and top-context settings.

Guide limitations

  • The documented command does not specify a corpus schema.
  • The documented setup requires an OpenAI API key.
COMPARE OPTIONS

Compare options for Retrieval-augmented applications

These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.

ProjectDocumented purposePlatformAccess and requirements
LogicragPlan retrieval steps for complex questions by identifying dependencies among their subproblems.CLI, Linux, macOS, WindowsThe repository is public and licensed under GPL-3.0. The documented setup requires Python dependencies and an OpenAI API key.
LangsearchCrawl website or local data for a knowledge base.CLI, Self-hosted, Server
Hybrid Search RagCombine document retrieval and language-model generation in a configurable workflow.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
12 October 2026
Original website title
chensyCN/LogicRAG · Official homepage title · retained in its source language