Vector DBs & RAG (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
GraphRAG: Combining Knowledge Graphs with Vector Embeddings for multi-hop reasoning.
senior LevelMost AskedData Structures
In Simple Words: Standard Vector RAG is great for finding specific facts ("What is the refund policy?"), but fails on global holistic questions ("What are the main themes across all customer complaints in 2024?").
- GraphRAG (Microsoft):
- Uses an LLM to extract Entities (People, Places, Concepts) and Relationships into a Knowledge Graph (Neo4j / NetworkX).
- Clusters the graph into communities using the Leiden algorithm and generates pre-computed summaries for each community.
- Combines vector semantic search with graph graph traversal: when a node matches, the retriever hops across relationships to gather connected entities, answering complex multi-hop queries.