INQUIRING LINE

Should an AI assistant follow links between facts, or just rank text by how similar it sounds?

How do graph-based retrieval systems compare to embedding-only approaches?

This explores when retrieval that follows explicit links between facts (knowledge graphs, graph databases) does better or worse than retrieval that only ranks text chunks by embedding similarity, and what each approach costs.


This explores when following explicit links between facts beats ranking text by embedding similarity, and what you pay for each. The corpus points to a short answer: embeddings handle "find me things like this" well and handle "connect these things" poorly. Graphs reverse that tradeoff. The main cost of a graph is building it, though not every approach builds one in advance.

Start with what embeddings actually measure. An embedding puts two pieces of text close together when they tend to appear in similar contexts. That is not the same as one being useful for answering the other. Concepts that are related but play different roles, like a drug and its side effect or a buyer and a seller, end up near each other. Demos look fine, but real queries are often vague and have many plausible-looking wrong matches Do vector embeddings actually measure task relevance?. The corpus treats this as a design limit rather than something tuning can fix. Embedding size even caps which combinations of documents a system can represent at all Where do retrieval systems fail and why?.

Graphs win on the queries embeddings can't express. Take "which suppliers serve customers in region X," or "how many of these are linked to that." Questions like these need several hops or a count, and similarity search has no way to traverse or add things up. A graph database answers them with exact lookups instead of a best guess, which gives precise and complete answers for enterprise data that is relational by nature When do graph databases outperform vector embeddings for retrieval?. The same gap shows up from another direction. Long-context LLMs can match standard RAG on meaning-based retrieval but fail when an answer requires joining structured tables Can long-context LLMs replace retrieval-augmented generation systems?. Graphs also help with "global" questions that span a whole document. MegaRAG builds layered graphs over books, with images as their own nodes, to answer questions about themes across chapters that no single retrieved chunk contains Can multimodal knowledge graphs answer questions that flat retrieval cannot?.

The price is building the graph: extraction, maintenance, and staleness when the source changes. Here the corpus gets more interesting, because the choice isn't really "pre-built graph or embeddings." LogicRAG builds a small graph of reasoning steps from each question as it arrives. That keeps the multi-hop benefit without a graph of the whole corpus Can query-time graph construction replace pre-built knowledge graphs?. Hierarchical systems that plan the query separately from writing the answer get similar gains on multi-step questions, which suggests much of the graph's value comes from adding structure to the reasoning, not to the storage Do hierarchical retrieval architectures outperform flat ones on complex queries?. Some work skips embeddings in the other direction too. An agent trained to search raw text with grep-style commands beats dense embeddings on questions that hinge on exact entity names, because exact string matching doesn't blur similar entities together the way embeddings do Can direct corpus search beat embedding-based retrieval?. In image recognition, describing a picture in words and then searching text works better than comparing embeddings directly Can describing images in text improve zero-shot recognition?.

The takeaway: "graph vs. embedding" is really a question about whether your queries need similarity or structure. If users mostly ask "what's relevant to this topic," embeddings are cheap and good enough. If they ask about relationships, counts, chains of facts, or whole-document themes, you need structure somewhere. It might live in a pre-built graph, a graph built for each query, a separate planning step, or an agent that searches exact text. Embeddings then become one tool in the system rather than all of it.


Sources 9 notes

Do vector embeddings actually measure task relevance?

Embeddings encode co-occurrence patterns, making semantically close but role-distinct concepts highly similar. This works in simple demos but fails in production where underspecified queries have many wrong-but-associated candidates.

Where do retrieval systems fail and why?

RAG systems fail at three structural levels: adaptive triggering (fixed intervals waste context), semantic-task mismatch (embeddings measure association, not relevance), and mathematical limits (embedding dimension constrains representable document sets). These require fundamentally different retrieval approaches, not tuning.

When do graph databases outperform vector embeddings for retrieval?

Graph-oriented databases solve vector similarity's failure on aggregate queries by replacing probabilistic similarity search with deterministic graph traversal via Cypher. The tradeoff: higher construction cost but precision and completeness for enterprise use cases where query patterns are relational.

Can long-context LLMs replace retrieval-augmented generation systems?

The LOFT benchmark shows LCLMs match RAG on semantic retrieval without explicit training, but cannot execute relational queries requiring joins across structured tables. Context length alone cannot bridge this gap.

Can multimodal knowledge graphs answer questions that flat retrieval cannot?

MegaRAG builds hierarchical multimodal knowledge graphs from text and visuals to answer cross-chapter, global questions that flat chunk retrieval cannot reach. The hierarchy supports abstraction levels from high-level summaries to page-specific details while treating images as first-class graph nodes.

Show all 9 sources
Can query-time graph construction replace pre-built knowledge graphs?

LogicRAG constructs directed acyclic graphs from queries at inference time rather than pre-building corpus-wide graphs, eliminating construction overhead, avoiding staleness, and enabling query-specific retrieval logic without sacrificing multi-hop reasoning capability.

Do hierarchical retrieval architectures outperform flat ones on complex queries?

Separating query planning from answer synthesis into distinct components reduces interference and improves multi-hop query performance. This architectural principle mirrors documented benefits of separating planning from execution in agent design.

Can direct corpus search beat embedding-based retrieval?

GrepSeek trains agents to retrieve via executable shell commands over raw text, achieving better multi-hop performance on entity-constrained queries than dense embeddings. The approach scaffolds unstable search mechanics with supervised trajectories, then refines task-oriented behavior through reinforcement learning.

Can describing images in text improve zero-shot recognition?

SignRAG demonstrates that describing an unknown image via vision-language model, then retrieving known designs from a text-indexed database, eliminates the need for recognition model training. Natural-language description bridges the visual-reference gap better than direct embedding similarity.

Papers this line draws on 8

The research behind the notes this line reads — ranked by how closely each paper relates.