Zenaique

When does PropertyGraphIndex beat VectorStoreIndex?

Short answer·Hard·4.0 · 0·~3 min·Asked atBcgCredPinecone
Attempt it

LlamaIndex offers PropertyGraphIndex (an LLM built knowledge graph of entities and relations) alongside the much more common VectorStoreIndex. Describe two concrete query patterns where PropertyGraphIndex pays off, and the major cost you pay to get those wins.

Free · 2 AI evals / day
TL;DR

Graph wins on multi-hop traversals and entity-centric aggregation that vector similarity cannot express; the cost is LLM-based extraction per chunk at ingest plus a graph store to operate.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Picture a giant library. A vector index is a librarian who points you at books that read like your question. Great for 'what is this book about'. A property graph is the librarian who has read every book and built a map of who was friends with whom, who worked at which lab in which year, what cited what. For 'find books on photosynthesis' the first librarian wins easily. For 'list every paper written by someone who studied under Einstein after 1925' the second librarian wins, but only because they spent months reading.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

Vector retrieval has become the default for retrieval-augmented generation, and for similarity-shaped queries it remains the right primitive. But there are question shapes vector search cannot express well, and on those questions a property graph dramatically outperforms. Knowing when each is the right tool, and pricing the costs honestly, is what separates a senior RAG engineer from someone who just defaults to whatever the latest LlamaIndex tutorial used.

This section walks the structural difference between vector and graph indexing, names the two question shapes where graph wins, prices the ingest cost in detail, discusses the extractor-quality binding constraint, and lands on the production pattern of routed hybrid retrieval.

What each index actually indexes

VectorStoreIndex chunks the corpus (typically 200-1000 tokens per chunk with overlap), embeds each chunk into a fixed-dimensional vector with an embedding model, and stores the chunks alongside their vectors. Query time: embed the query, find nearest-neighbor chunks by cosine or dot-product similarity, return them to the LLM as context. The index treats chunk content as opaque text whose only addressable property is semantic position in embedding space.

PropertyGraphIndex does more work at ingest. For each chunk, an LLM call extracts entities (names, types, properties) and relations (typed edges between entities). The result is stored as a knowledge graph. Nodes for entities, edges for relations, with the source chunk attached as evidence. Query time has more options: pure graph traversal (walk the relations matching the query's pattern), entity-anchored retrieval (find entities relevant to the query, return their attached chunks), or hybrid (combine graph and vector results).

The structural difference is what gets indexed. Vector indexes meaning; property graph indexes structure. Workloads that lean on meaning (find similar passages) are vector-shaped. Workloads that lean on structure (find paths, aggregate by attribute) are graph-shaped.

Multi-hop reasoning. The headline win for graph
Entity-centric aggregation. The second structural win
The cost of building the graph honestly
Extractor quality is the binding constraint
Production pattern. Routed hybrid retrieval
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.
AspectVectorStoreIndexPropertyGraphIndex
IndexesChunk embeddingsEntities, relations, and chunk references
Best query shapeFind similar passagesMulti-hop traversal and entity aggregation
Ingest costEmbedding call per chunkLLM extraction call per chunk plus embeddings
Failure modeStitches concepts in-context, hallucinates joinsNoisy graph if extractor is weak
StorageSingle vector collectionVector store plus graph store (Neo4j, Kuzu, or in-memory)

Real products, models, and research that use this idea.

  • LlamaIndex's PropertyGraphIndex tutorials use Neo4j for production and SimplePropertyGraphStore for dev
  • Legal-document retrieval at companies like Harvey uses graph-enhanced retrieval for case-citation traversal
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QHow does the GraphRAG approach (Microsoft Research) differ from LlamaIndex's PropertyGraphIndex?
A

GraphRAG builds a knowledge graph then clusters entities into communities and pre-summarizes each community. Queries route to community summaries for global questions and to specific entities for local questions. PropertyGraphIndex provides similar primitives but leaves community-detection and summarization as user-orchestrated patterns rather than baked-in pipeline.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Defaulting to PropertyGraphIndex because graphs sound powerful, then discovering the ingest cost is 10-50x the vector pipeline for queries that vector search could have answered fine.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • What PropertyGraphIndex extracts and stores versus VectorStoreIndex

  • Multi-hop reasoning as a structural win for graph retrieval

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Defend the call to…
Short answer·Hard