INQUIRING LINE

What makes graph databases better than embeddings for relational queries?

This explores when graph databases beat vector embeddings for queries about relationships between things — and what that 'better' actually buys you.


This explores when graph databases beat vector embeddings for relational queries — questions about how entities connect, not just which documents look similar. The short version from the corpus: embeddings answer "what's similar to this?" while graphs answer "what's connected to this, and how?" — and a lot of real questions are secretly the second kind wearing the clothes of the first.

The core case is laid out in When do graph databases outperform vector embeddings for retrieval?: vector similarity is *probabilistic* — it finds chunks that resemble your query — but it falls apart on aggregate and multi-hop questions ("which suppliers ship to customers in region X who also returned product Y?"). A graph replaces that fuzzy resemblance with *deterministic traversal*: you walk explicit edges via a query language like Cypher, so you get precision and completeness instead of a ranked guess. The price is construction cost — you have to build the graph first. That tradeoff frames everything else here.

Why traversal wins isn't just engineering — it's about noise. Can graph structure patterns outperform direct edge signals in noisy data? makes a sharp point: structural signals are inherently noise-resistant because a real connection requires multiple independent edges to line up, which rarely happens by chance, whereas a single similarity score can be fooled by one coincidental match. And Where do retrieval systems fail and why? names the deeper limit: embeddings measure *association, not relevance*, and the dimension of the embedding mathematically caps how many distinct document relationships it can even represent. That's not a tuning problem you can fix with a better model — it's structural, which is exactly the gap graphs fill.

Here's the twist the corpus adds, and it's the thing you might not have known you wanted to know: structure only helps if the system actually *uses* it. Can language models actually use graph structure information? found that language models learn to recognize graph-shaped data but barely notice when you shuffle the actual connections — they treat the graph as a category, not as relationships. So "graphs beat embeddings" is really a claim about the *retrieval layer*, not a free lunch you get by feeding a graph to a model. The advantage lives in deterministic traversal, not in the model magically understanding topology.

The frontier here is making graphs cheaper without losing that traversal precision. Can query-time graph construction replace pre-built knowledge graphs? builds a small graph *per query* at inference time to dodge the construction cost entirely; Can learned traversal policies beat exhaustive graph reading? learns *which* paths to walk instead of reading the whole graph; Can hypergraphs capture multi-hop reasoning better than graphs? pushes the other way, letting a single edge bind three-plus entities so multi-step constraints survive intact. And for the highest-level "global" questions that span a whole corpus, Can multimodal knowledge graphs answer questions that flat retrieval cannot? and Do hierarchical retrieval architectures outperform flat ones on complex queries? show hierarchy and planning doing what flat similarity search simply can't reach. If you want to go deeper on where this stops being a clean win, those are the doors.


Sources 9 notes

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 graph structure patterns outperform direct edge signals in noisy data?

Taobao's Swing algorithm constructs more robust product substitute graphs by exploiting quasi-local bipartite patterns rather than single edges. Structural signals are inherently noise-resistant because they require multiple independent noisy edges to coincidentally align, which rarely happens by chance.

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.

Can language models actually use graph structure information?

LLMs develop attention shifts toward node tokens after training, but randomly shuffled topology barely affects performance. Models treat graph data as a category to recognize rather than as structured relationships to use.

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.

Can learned traversal policies beat exhaustive graph reading?

Graph-O1 replaces whole-graph ingestion with step-by-step agentic navigation using Monte Carlo Tree Search and reinforcement learning. This approach fits within LLM context windows while learning domain-specific traversal policies, though it trades certainty about the full graph for decision-making under uncertainty.

Can hypergraphs capture multi-hop reasoning better than graphs?

HGMem organizes retrieved evidence as hyperedges rather than flat lists or binary graphs, allowing three or more entities to bind into single relations without decomposition. This structure accumulates coherent knowledge across retrieval steps, trading representational complexity for constraint expressiveness.

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.

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.

Next inquiring lines