SYNTHESIS NOTE
TopicsRAGthis note

Can query-time graph construction replace pre-built knowledge graphs?

Does building dependency graphs from individual queries at inference time offer a more flexible and cost-effective alternative to constructing knowledge graphs over entire document collections upfront?

Synthesis note · 2026-02-22 · sourced from RAG
RAG How do you navigate synthesis across fragmented research topics?

GraphRAG builds a knowledge graph over the entire corpus before any query is served. The graph captures relationships between entities in documents, enabling multi-hop reasoning by traversal. Performance on complex tasks is strong. But the pre-building cost is prohibitive: token overhead for graph construction, latency for updating as the corpus evolves, and the graph being LLM-generated may include irrelevant or redundant relationships.

Worse: the pre-built graph is static. Real-world queries vary in type and complexity, requiring different logic structures for accurate reasoning. A graph built for financial reporting queries may not support the traversal patterns needed for medical diagnosis queries on the same corpus.

LogicRAG inverts this: instead of building a graph over the corpus, build a graph over the query at inference time. Decompose the query into subproblems, construct a directed acyclic graph (DAG) encoding logical dependencies between subproblems, topologically sort for execution order, resolve each subproblem via retrieval conditioned on previously resolved subproblems.

The result: retrieval plans that match the logical structure of the specific query. A multi-hop question about "which policies introduced by this figure were later reversed?" generates a DAG with specific dependency edges that no pre-built graph would have pre-encoded. Context pruning (LLM-based summarization of retrieved content) and graph pruning (merging semantically similar subproblems) reduce token overhead.

This generalizes Do hierarchical retrieval architectures outperform flat ones on complex queries? — the same separation principle, implemented dynamically at the query level rather than architecturally.

Inquiring lines that read this note 50

This note is a source for these research framings, grouped by the broader line of inquiry each explores. Scan the bold lines of inquiry; follow any specific question forward.

How do knowledge graphs enable efficient multi-hop reasoning over alternatives? Do accurate-looking LLM outputs hide structural failures in learning and reasoning? Can graph structure and relationships fundamentally improve recommendation systems? How do knowledge injection methods compare across cost and effectiveness? How should retrieval systems optimize for multi-step reasoning during inference? Why do semantic similarity and task relevance diverge in vector embeddings? When should retrieval-augmented systems decide to fetch new information? How should memory consolidation strategies shape agent performance over time?

Related concepts in this collection 4

This note in its neighbourhood — explore the map, then jump to a related concept in the list below.

Concept map
12 direct connections · 69 in 2-hop network ·medium cluster Open in graph ↗

Click a node to walk · click center to open · click Open in graph to see this note in the full knowledge graph

your link semantically near linked from elsewhere

Related papers in this collection 8

Papers most semantically related to this note, ranked by cosine similarity in the embedding space.

Original note title

inference-time query logic graphs avoid the cost and inflexibility of pre-built knowledge graph rag