Last updated on
Microsoft has released a new technology named GraphRAG to the public. This innovation allows chatbots and answer engines to efficiently link information throughout extensive datasets, significantly surpassing the performance of conventional Retrieval-Augmented Generation (RAG) methods.
RAG (Retrieval-Augmented Generation) technology allows a large language model (LLM) to access a database similar to a search index to generate answers to questions. It serves as a bridge between LLMs and traditional search engine indexes.
The advantage of RAG lies in its ability to utilize authoritative and reliable data for answering queries. It empowers generative AI chatbots to provide up-to-date information on topics beyond their original training scope, a method also employed by AI search engines such as Perplexity.
However, RAG’s reliance on embeddings presents a limitation. Embeddings are representations that capture semantic relationships among words, sentences, and documents. While effective for retrieving information from a database (like a search index) based on specific queries, this approach restricts RAG to matching text at a detailed level rather than comprehensively across the entire dataset.
Microsoft explains that traditional RAG, by only considering the top-k most similar chunks of input text, often fails. This approach can lead to matching questions with superficially similar text chunks, resulting in inaccurate answers.
GraphRAG introduces a significant innovation by enabling a large language model (LLM) to generate answers based on the entire dataset. Instead of relying solely on isolated text chunks, GraphRAG constructs a knowledge graph from indexed documents, which are typically unstructured data like web pages. This structured representation captures relationships between various entities such as people, places, concepts, and objects, facilitating easier interpretation by machines.
GraphRAG organizes these entities into “communities” representing general themes and more specific “topics.” Each community is summarized hierarchically by the LLM, creating a condensed overview of the data. This breakthrough allows chatbots to provide answers based on knowledge derived from these summaries rather than depending solely on embeddings, marking a significant advancement in question-answering technology.
According to Microsoft:
“By employing a large language model (LLM) to summarize each community, we generate a hierarchical overview of the dataset. This approach eliminates the need to predetermine specific questions. Each community’s summary encompasses descriptions of its entities and their interrelationships.
Community summaries play a crucial role in addressing broad queries since the graph index of entity and relationship descriptions incorporates insights from all input texts during its construction. This allows us to adopt a map-reduce methodology for question answering, ensuring that pertinent content from the overall data context is retained.”
The original research paper on GraphRAG demonstrated its effectiveness in answering questions even when exact matching data is unavailable in the indexed documents. For instance, the study utilized a constrained dataset comprising Russian and Ukrainian news articles from June 2023, which were translated into English.
In the first example, both RAG and GraphRAG were tested with the question “What is Novorossiya?” GraphRAG provided a more comprehensive response.
For clarity, “Novorossiya” translates to “New Russia” and historically refers to Ukrainian territories annexed by Russia in the 18th century.
In the second example, the task required the machine to establish connections between concepts within the indexed documents, termed by Microsoft as a “query-focused summarization (QFS) task,” which goes beyond simple text retrieval. This task involves what Microsoft describes as “connecting the dots.”
The specific question posed to both RAG and GraphRAG systems was:
“What has Novorossiya done?”
RAG’s response was:
“The text does not contain specific information about actions taken by Novorossiya.”
GraphRAG provided a detailed response to the question “What has Novorossiya done?” with a two-paragraph answer that outlines the actions of the Novorossiya political movement.
Here’s a brief excerpt from the response:
“Novorossiya, a political movement in Ukraine, has engaged in a series of disruptive activities, targeting various Ukrainian entities [Entities (6494, 912)]. The movement has been associated with plans to damage properties belonging to several Ukrainian entities, including Rosen, the Odessa Canning Factory, the Odessa Regional Radio Television Transmission Center, and the National Television Company of Ukraine [Relationships (15207, 15208, 15209, 15210)]…
…The Ukrainian Office of the General Prosecutor has documented the emergence of Novorossiya, indicating government awareness and potential concerns regarding the activities of this movement…”
This excerpt highlights GraphRAG’s ability to synthesize information across the dataset, illustrating its capacity to connect information dispersed throughout multiple documents.
Microsoft has made GraphRAG publicly accessible to everyone.
“Today, we’re excited to announce that GraphRAG is now available on GitHub. It offers enhanced structured information retrieval and comprehensive response generation compared to traditional RAG methods. The GraphRAG code repository is accompanied by a solution accelerator, featuring a user-friendly API experience hosted on Azure, allowing deployment with just a few clicks and without the need for coding.”
Microsoft’s release of GraphRAG aims to increase accessibility to its solutions and encourages community feedback for further enhancements.
Original news from SearchEngineJournal