Chapter 1. Introduction to GraphRAG
Graph databases have become an essential component of the generative AI (GenAI) ecosystem because they complement the strengths of large language models (LLMs). LLMs excel at processing and generating natural language, while knowledge graphs are optimized for representing structured information—capturing entities, relationships, and domain-specific context. When used together, these technologies are capable of solving problems that neither could address effectively on their own.
Early GenAI systems focused heavily on prompt engineering and vector search to improve model performance. While effective for general-purpose queries, these approaches struggle in enterprise settings where questions require domain understanding, relationship reasoning, or adherence to business rules. Without structured context, LLMs often produce answers that are vague, inconsistent, or incorrect. Knowledge graphs address this gap by encoding domain knowledge in a structured, queryable ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access