You do not need to prebuild a giant knowledge graph to run GraphRAG. Standard GraphRAG pipelines read tens of thousands of documents ahead of time to map every entity and relationship before a single user asks a question. Even minor corpus updates can wipe out hours of preprocessing and hundreds of thousands of KRW in API fees. Researchers at The Hong Kong Polytechnic University introduced LogicRAG, a lazy query-time alternative that builds reasoning paths only when a question arrives.

  1. Live Reasoning Blueprints Instead of Prebuilt Encyclopedias: If traditional GraphRAG acts like a librarian cataloging every shelf in advance, LogicRAG works like a detective investigating on demand. When a complex question arrives, the model decomposes it on the fly and sketches a small directed acyclic graph (DAG) of dependencies - solving step 1 before step 2 - exploring only the paths needed for that query.
  2. Untangling Dependencies and Pruning Context: Even a sharp detective stalls when buried in paperwork (context overflow). LogicRAG applies topological sorting to flatten tangled sub-questions into a clean one-way search sequence, and uses rolling memory (pruning) to distill dozens of retrieved pages into concise one-line notes while discarding raw text to save tokens.
  3. Strong Accuracy from a Budget Model: Live planning and summarization do not require heavyweight frontier models. Using gpt-4o-mini, the team cut offline graph-building cost to 0 KRW and hit 64.7% accuracy on the 2WikiMQA benchmark - beating HippoRAG2, a leading prebuilt-graph baseline, by 14.7 percentage points.
  4. Trade-offs in Premature Certainty and Latency: On reasoning chains of 4-hop depth or deeper, the model occasionally jumps to conclusions before gathering enough evidence (premature certainty). Query-time planning also pushes response latency to roughly 9.8 seconds, more than double Vanilla RAG at roughly 4.2 seconds.

Closing thought: LogicRAG challenges the industry habit of pouring budget into rigid, precomputed graph schemas, showing that applying modern LLM reasoning at query time can be both cheaper and more accurate in 2026.

High preprocessing bills and steep API invoices stop many engineering teams from deploying GraphRAG in production. Parsing tens of thousands of documents upfront to maintain a static knowledge graph becomes painful whenever underlying data changes. Proposed by researchers at The Hong Kong Polytechnic University, LogicRAG shifts graph construction entirely to query time.

Building Reasoning DAGs at Query Time

Instead of pre-indexing a graph database, LogicRAG drafts an execution plan the moment a query arrives. Given a multi-step question, the LLM decomposes it into sub-questions and sketches a DAG capturing logical dependencies, exploring only the retrieval paths required for the active prompt.

Classical graph ordering and memory pruning keep the context window lean. Topological sorting flattens interdependent sub-questions into a linear retrieval order, while rolling memory summarizes key findings from retrieved documents and discards raw passages to conserve tokens.

Beating Prebuilt Graphs with a Lightweight Model

LogicRAG reaches strong benchmark numbers using lightweight gpt-4o-mini rather than expensive frontier models. On 2WikiMQA, it recorded 64.7% accuracy, outperforming the prebuilt-graph baseline HippoRAG2 by 14.7 percentage points while keeping offline preprocessing cost at 0 KRW.

Two trade-offs remain worth watching. When reasoning depth reaches 4 hops or more, the model can exhibit premature certainty by guessing an answer from incomplete clues. Live graph planning and rolling summarization also bring average latency to 9.8 seconds, more than twice the 4.2 seconds of Vanilla RAG.

Rather than locking corpora into expensive static graph schemas upfront, spending runtime compute on structured query-time reasoning offers a lighter, more adaptable RAG architecture.

Summary

  • Eliminates offline preprocessing costs (0 KRW) by generating query-specific reasoning DAGs at runtime instead of prebuilding static knowledge graphs.
  • Combines topological sorting with rolling memory pruning to keep multi-step retrieval within tight token budgets.
  • Reaches 64.7% accuracy on 2WikiMQA with gpt-4o-mini, beating HippoRAG2 by 14.7 percentage points at the cost of roughly 9.8-second query latency.