When does PropertyGraphIndex beat VectorStoreIndex?
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.
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.
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.
Detailed answer & concept explanation~7 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 minutes: name the two structural wins (multi-hop, entity aggregation), price the per-chunk extraction cost honestly, identify extractor-quality as the binding constraint, and frame production usage as a routed hybrid rather than 'graph for everything'.
| Aspect | VectorStoreIndex | PropertyGraphIndex |
|---|---|---|
| Indexes | Chunk embeddings | Entities, relations, and chunk references |
| Best query shape | Find similar passages | Multi-hop traversal and entity aggregation |
| Ingest cost | Embedding call per chunk | LLM extraction call per chunk plus embeddings |
| Failure mode | Stitches concepts in-context, hallucinates joins | Noisy graph if extractor is weak |
| Storage | Single vector collection | Vector 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
- Bloomberg's GPT applications use entity graphs for company and executive aggregation queries
- GraphRAG (Microsoft Research, 2024) demonstrated the multi-hop reasoning advantage on global question-answering benchmarks
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?
QWhat changes if you replace the LLM extractor with a fine-tuned NER + RE pipeline?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
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.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.