Share E-Book
Scan to open this page

Scan with your phone to open this page

AuthorTomaž Bratanic, Oskar Hane

No description

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A practical, hands-on guide to making LLM applications more accurate by combining retrieval-augmented generation with knowledge graphs. Best for developers, data practitioners, and researchers who already know basic RAG and want to build explainable, domain-aware GraphRAG pipelines. 【Book Arc】 - **Opening (~0%–10%)**: Frames the core problem—LLMs hallucinate, lack domain knowledge, and go stale—and positions knowledge graphs as the structured bridge that RAG alone misses. - **Early (~10%–30%)**: Builds RAG fundamentals: retriever/generator split, embeddings, vector similarity search, and hybrid search with full-text retrieval in Neo4j. - **Middle (~30%–50%)**: Advances retrieval quality with strategies like hypothetical-question embedding and parent-document retrieval, then moves toward generating Cypher queries from natural language. - **Late (~50%–75%)**: Introduces agentic RAG (retriever tools, routing, answer critic) and shows how LLMs extract structured data to construct knowledge graphs, including entity resolution. - **Ending (~75%–100%)**: Walks through Microsoft's GraphRAG implementation—chunking, entity/relationship extraction and summarization, community detection, global vs. local search—and closes with RAG evaluation benchmarks. 【Key Takeaways】 - **RAG separates retrieval from generation** (Early): the retriever finds relevant context, the generator writes the answer; this lets you use smaller, cheaper models and reduces hallucination. - **Vector similarity search is the baseline, not the ceiling** (Early): embeddings capture meaning, but quality degrades as data complexity grows. - **Hybrid search improves retrieval** (Middle): combining vector search with full-text search surfaces matches that either method alone would miss. - **Smarter embedding strategies beat raw document embedding** (Middle): hypothetical questions and parent-document retrieval better capture meaning and preserve context. - **Knowledge graphs bridge structured and unstructured data** (Early): they connect conversational mentions to exact records, enabling context-rich, explainable retrieval. - **LLMs can build the graph** (Late): structured outputs extract entities and relationships from text, followed by entity resolution and linking unstructured content. - **Agentic RAG adds control** (Late): retriever tools, a router, and an answer critic make pipelines more robust than a single retrieval step. - **Evaluation must be designed, not assumed** (Ending): benchmark datasets and metrics like context recall, faithfulness, and answer correctness reveal whether GraphRAG actually helps. 【Reading Tips】 - Skim chapters 1–2 if you already know RAG basics; deep-read from chapter 3 onward where retrieval strategy and graph construction begin. - Treat the Neo4j appendix as a setup companion—return to it when code examples reference the environment. - Pay closest attention to chapter 6 (graph construction) and chapter 7 (Microsoft GraphRAG); these are the conceptual core of the book. - Don't skip chapter 8; evaluation is what separates a demo from a reliable system. - Keep the retriever/generator distinction in mind throughout—most design decisions trace back to it. 【Coverage Limits】 This guide is based on stratified excerpts covering the table of contents, preface, and selected chapters; detailed code listings and some intermediate sections are not fully represented, so specific implementation details may be thinner than the book itself.
Page 13
wledge graphs with retrieval-augmented generation (RAG). We figured it might as well be us. The idea wasn’t born from some grand epiphany—it was just a pract...
View in text
Excerpt 2
f applications. Yet, as with any transformative technology, they are not without their challenges and constraints. In the following section, we will delve in...
View in text
Excerpt 3
query time. 2.2 RAG using vector similarity search 23 f t Once we have decided on a embedding model, we need to make sure that we use the same model througho...
View in text
Excerpt 4
, the question “What did Leopold study at the University of California?” is encoded by the vector [1,2,3,0,5] in figure 3.2. When a user poses a question, th...
View in text
Excerpt 5
a in [r.data() for r in node_labels_response.records] ] rel_properties_query_response = driver.execute_query(REL_PROPERTIES_QUERY) rel_properties = [ data["o...
View in text
Excerpt 6
ontext answer_given_description = { "type": "function", "function": { "name": "answer_given", "description": "If a complete answer to the question is already...
View in text
Excerpt 7
es may be more complex and can be defined as custom objects. For instance, the parties attribute is a list of Organization objects. A list is used because co...
View in text
Excerpt 8
rties to } their location MERGE (p)-[:LOCATED_AT]->(loc) MERGE (p)-[r:HAS_PARTY]->(contract) Links parties to SET r.role = party.role the contract Explaining...
View in text
Tags
AI categories
Artificial IntelligenceGoBackend
Publish Year: 2025
Language: English
File Format: PDF
File Size: 2.1 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…