Knowledge Graph-Enhanced RAG
Tomaž BrataniË, Oskar Hane

#GraphRAG
#RAG
#LLM
#Neo4j
#Python
ارتقا برنامههای RAG خود با قدرت گرافهای دانش
Retrieval Augmented Generation (RAG) روش عالی برای بهرهبرداری از قدرت هوش مصنوعی مولد برای اطلاعاتی است که در دادههای آموزشی LLM موجود نیست و برای جلوگیری از وابستگی به LLM برای اطلاعات واقعی. اما RAG تنها زمانی کار میکند که بتوانید به سرعت زمینهی مرتبطترین را به LLM ارائه دهید. Essential GraphRAG به شما نشان میدهد چگونه از گرافهای دانش برای مدلسازی دادههای RAG خود استفاده کنید و عملکرد، دقت، پیگیری و جامعیت بهتری را ارائه دهید.
در Essential GraphRAG شما خواهید آموخت:
Essential GraphRAG راهنمایی عملی برای توانمندسازی LLMها با RAG است. شما یاد خواهید گرفت که چگونه از رویکردهای مشابهت برداری برای پیدا کردن اطلاعات مرتبط استفاده کنید، با لایههای معنایی کار کنید، RAG عاملمحور را ارائه دهید و دستورات Cypher را برای بازیابی دادهها از یک گراف دانش تولید کنید.
درباره فناوری
یک سیستم Retrieval Augmented Generation (RAG) به طور خودکار زمینه خاص دامنه را به LLM انتخاب کرده و ارائه میدهد، که توانایی آن را برای تولید پاسخهای دقیق و بدون هذیان به طرز چشمگیری بهبود میبخشد. الگوی GraphRAG از یک گراف دانش برای ساختاردهی ورودی RAG استفاده میکند و از روابط موجود در دادهها برای تولید پرسوجوهای غنی و مرتبط بهره میبرد.
درباره کتاب
Essential GraphRAG به شما نشان میدهد چگونه یک سیستم GraphRAG با کیفیت تولید بسازید و راهاندازی کنید. شما یاد خواهید گرفت که چگونه دانش ساختار یافته را از متن استخراج کنید و چگونه روشهای جستجوی مبتنی بر بردار و گراف را ترکیب کنید. این کتاب پر از مثالهای عملی است، از ساخت ابزار جستجوی مشابهت برداری و برنامههای کاربردی RAG عاملمحور گرفته تا ارزیابی عملکرد و دقت و بیشتر.
آنچه در این کتاب خواهید یافت
درباره خوانندگان کتاب
این کتاب برای خوانندگانی است که دارای مهارتهای متوسط در Python و تجربهای در کار با پایگاه داده گرافی مانند Neo4j هستند.
درباره نویسنده
تومژ براتانیچ نویسنده کتاب Graph Algorithms for Data Science از انتشارات Manning و مشارکتکننده در LangChain و LlamaIndex است. او تجربه زیادی در زمینه گرافها، یادگیری ماشین و هوش مصنوعی مولد دارد. اسکار هانه رهبر تیم مهندسی هوش مصنوعی مولد در Neo4j است.
Upgrade your RAG applications with the power of knowledge graphs.
Retrieval Augmented Generation (RAG) is a great way to harness the power of generative AI for information not contained in a LLM’s training data and to avoid depending on LLM for factual information. However, RAG only works when you can quickly identify and supply the most relevant context to your LLM. Essential GraphRAG shows you how to use knowledge graphs to model your RAG data and deliver better performance, accuracy, traceability, and completeness.
Inside Essential GraphRAG you’ll learn:
• The benefits of using Knowledge Graphs in a RAG system
• How to implement a GraphRAG system from scratch
• The process of building a fully working production RAG system
• Constructing knowledge graphs using LLMs
• Evaluating performance of a RAG pipeline
Essential GraphRAG is a practical guide to empowering LLMs with RAG. You’ll learn to deliver vector similarity-based approaches to find relevant information, as well as work with semantic layers, deliver agentic RAG, and generate Cypher statements to retrieve data from a knowledge graph.
About the technology
A Retrieval Augmented Generation (RAG) system automatically selects and supplies domain-specific context to an LLM, radically improving its ability to generate accurate, hallucination-free responses. The GraphRAG pattern employs a knowledge graph to structure the RAG’s input, taking advantage of existing relationships in the data to generate rich, relevant prompts.
About the book
Essential GraphRAG shows you how to build and deploy a production-quality GraphRAG system. You’ll learn to extract structured knowledge from text and how to combine vector-based and graph-based retrieval methods. The book is rich in practical examples, from building a vector similarity search retrieval tool and an Agentic RAG application, to evaluating performance and accuracy, and more.
What's inside
• Embeddings, vector similarity search, and hybrid search
• Turning natural language into Cypher database queries
• Microsoft’s GraphRAG pipeline
• Agentic RAG
About the reader
For readers with intermediate Python skills and some experience with a graph database like Neo4j.
About the author
The author of Manning’s Graph Algorithms for Data Science and a contributor to LangChain and LlamaIndex, Tomaž Bratanic has extensive experience with graphs, machine learning, and generative AI. Oskar Hane leads the Generative AI engineering team at Neo4j.
Table of Contents
1 Improving LLM accuracy
2 Vector similarity search and hybrid search
3 Advanced vector retrieval strategies
4 Generating Cypher queries from natural language questions
5 Agentic RAG
6 Constructing knowledge graphs with LLMs
7 Microsoft’s GraphRAG implementation
8 RAG application evaluation
A The Neo4j environment
Tomaž Bratanic is a network scientist at heart, working at the intersection of graphs and machine learning. He has applied these graph techniques to projects in various domains including fraud detection, biomedicine, business-oriented analytics, and recommendations.
Oskar Hane is a Senior Staff Software Engineer at Neo4j. He has over 20 years of experience as a Software Engineer and 10 years of experience working with Neo4j and knowledge graphs. He is currently leading the Generative AI engineering team within Neo4j, with the focus to provide the best possible experience for other developers to build GenAI applications with Neo4j.









