GraphRAG: An Improved RAG Technique That's Now Free
Microsoft has launched GraphRAG, an improved version of RAG technology, now available for free on GitHub. GraphRAG enables more structured information retrieval and comprehensive answer generation.
Microsoft has made a new technology available, called GraphRAG, which enables chatbots and answer engines to draw connections across an entire dataset, outperforming the standard Retrieval-Augmented Generation (RAG) technique by a wide margin.
What's the Difference Between RAG and GraphRAG?
RAG (Retrieval-Augmented Generation) enables a large language model (LLM) to use a database as a search index to answer questions. RAG uses reliable data to provide accurate answers and can update generative AI chatbots with current information. The technique uses "embeddings" to represent semantic relationships between words, sentences, and documents, allowing it to match search queries with text in a database.
The downside of RAG is that it can only match text at a basic level, which can lead to inaccurate answers.
GraphRAG creates a knowledge graph from indexed documents, providing a structured representation of relationships between different entities such as people, places, and concepts. This enables an LLM to answer questions based on the entire dataset, rather than just matching text.
Benefits of GraphRAG
GraphRAG creates "community summaries" of data, providing a hierarchical summary used to answer questions. This allows a chatbot to give answers based on knowledge rather than just text matching.
Microsoft explains:
"Using an LLM to summarize these communities creates a hierarchical summary of the data, providing an overview of a dataset without needing to know which questions will be asked in advance. Each community serves as the basis for a community summary that describes its entities and their relationships."
Example of RAG vs. GraphRAG
In a study, RAG and GraphRAG were compared to answer questions from a dataset of Russian and Ukrainian news from June 2023.
The question "What has Novorossiya done?" was answered by RAG with: "The text doesn't provide any specific information about what Novorossiya has done."
GraphRAG, on the other hand, gave a detailed two-page answer describing Novorossiya's political movement and its activities.
GraphRAG Now Available to Everyone
Microsoft has now made GraphRAG available on GitHub, offering more structured information retrieval and comprehensive answer generation compared to standard RAG. The solution can be used with an API experience on Azure, which can be deployed without coding in just a few clicks.