What you will learn in Essential GraphRAG
Knowledge Graph-Enhanced RAG
Chapter by chapter
Chapter 1: Improving LLM accuracy
This introduction frames GraphRAG as a way to improve LLM accuracy and currency by combining retrieval-augmented generation with knowledge graphs that connect structured and unstructured data.
What you learn in chapter 1 →Chapter 2: Vector similarity search and hybrid search
This chapter introduces using embeddings, vector similarity search, and hybrid search in a RAG application to answer questions from unstructured data.
What you learn in chapter 2 →Chapter 3: Advanced vector retrieval strategies
This chapter introduction motivates improving a basic RAG retriever with query rewriting and advanced document-embedding strategies to retrieve more relevant, complete context for answer generation.
What you learn in chapter 3 →Chapter 4: Generating Cypher queries from natural language questions
This chapter introduces generating Cypher queries from natural-language questions to make knowledge-graph retrieval more flexible and dynamic.
What you learn in chapter 4 →Chapter 5: Agentic RAG
This introduction frames agentic RAG as a multi-retriever system in which a router selects suitable retrieval agents, typically through LLM tool use.
What you learn in chapter 5 →Chapter 6: Constructing knowledge graphs with LLMs
This chapter introduces using LLMs to extract structured information from unstructured text and turn it into a knowledge graph for queries that embeddings alone handle poorly.
What you learn in chapter 6 →Chapter 7: Microsoft’s GraphRAG implementation
This chapter introduces Microsoft’s GraphRAG pipeline, which builds a summarized knowledge graph and retrieves from it through global and local search.
What you learn in chapter 7 →Chapter 8: RAG application evaluation
This chapter introduces a benchmark-based approach to evaluating a RAG agent at tool-selection, retrieval, answer-generation, and end-to-end levels using RAGAS.
What you learn in chapter 8 →Concepts explained in this book
- language modelA large language model is a neural language model trained on extensive text data to generate human-like text by predicting token sequences.
- text chunkText chunking is the process of splitting source text into smaller pieces for downstream processing and retrieval.
- structured extractionStructured data extraction is the process of converting information from unstructured sources into machine-readable data organized by explicit fields and relationships.
- community summaryA community-level summary is a concise natural-language description of the entities, relationships, themes, and information associated with a graph community.
- ParentDocumentRetrieverParent document retrieval is a strategy that embeds or matches smaller child segments while returning their enclosing parent document for broader context.
- retriever routerA retriever router is a function that selects the most appropriate retriever for a user question and may extract the retriever's input arguments.
- global searchGlobal search is a GraphRAG retrieval technique that answers broad queries by aggregating information from summaries of communities across an entire dataset.
- knowledge graphA knowledge graph is a structured representation of entities, attributes, and relationships that supports semantic connections among information.
- hierarchical community structureA community hierarchy is an arrangement of graph communities across levels of increasing abstraction or aggregation.
- step-back promptingStep-back prompting is a prompting technique that reformulates a specific question into a more general question or perspective before retrieval or generation.
- local searchLocal search is a GraphRAG retrieval method that combines information from entities and their nearby graph structure with related source-text passages.
- retrieval-augmented generationA retrieval-augmented generation pipeline combines information retrieval with language-model generation to produce responses grounded in retrieved information.
- unstructured dataUnstructured data is information without a predefined tabular or schema-based organization, such as free-form text.
- fidelityFaithfulness is a metric that measures whether a generated answer is supported by the retrieved context without introducing unsupported information.
- contract data modelA contract data model is a structured specification of the fields and categories used to represent information extracted from legal contracts.
- hypothetical question embeddingHypothetical question embedding is a retrieval strategy that embeds questions a document could answer and matches user queries against those question embeddings.
- query rewritingQuery rewriting is the transformation of a user query into a formulation that better matches the language and context of target documents.
- hybrid searchHybrid search is an information-retrieval technique that combines multiple retrieval methods, such as vector similarity search and full-text search.
- entity and relationship extractionEntity extraction is the process of identifying and describing entities of specified types in source text.
- communityA graph community is a group of graph entities that is more densely connected internally than to the rest of the graph.
- parent documentA parent document is a document segment that contains smaller child documents and provides a larger context unit for retrieval.
- community detectionCommunity detection is the analysis of a graph to identify groups of entities with relatively dense internal connectivity.
- relation extractionRelationship extraction is the process of identifying and describing semantic connections between entities found in source text.
- GraphRAGGraphRAG is a retrieval-augmented generation approach that incorporates graph-structured knowledge into information retrieval and response generation.
- query updaterA query updater is a component that rewrites outstanding questions using the original question and answers obtained from earlier retrievals.
- community summarizationCommunity summarization is the generation of a concise report describing a graph community, its entities, relationships, and notable information.
- Louvain algorithmThe Louvain method is a graph community-detection algorithm that identifies communities by optimizing modularity.
- child documentA child document is a smaller text segment derived from a parent document and associated with an embedding for retrieval.
- tiktokentiktoken is a tokenization library developed by OpenAI for encoding text and counting language-model tokens.
- context recallContext recall is a retrieval metric that measures how much of the information needed to answer a question is present in the retrieved context.
- answer criticAn answer critic is a component that evaluates whether a retrieved answer correctly and completely answers the original question and can prevent unsupported answers from being returned.
- entity resolutionEntity resolution is the process of identifying and merging different representations of the same real-world entity within a dataset or knowledge graph.
- agentic RAGAgentic RAG is a retrieval-augmented generation pattern in which agents and routing mechanisms select and coordinate retrieval actions to answer a question.
- entity summarizationEntity summarization is the process of consolidating multiple descriptions of the same entity into a single coherent description while preserving relevant details and resolving contradictions.
- relationship summarizationRelationship summarization is the process of consolidating multiple descriptions of the same relationship between entities into a single coherent description.
- Text2cypherText2cypher is a technique that converts natural-language questions into Cypher queries for graph-database retrieval.
- transformer architectureA transformer architecture is a neural-network architecture that processes sequences using attention-based representations and supports efficient language modeling.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
