From Local to Global: A Graph RAG Approach to Query-Focused Summarization

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Edge, Darren, Trinh, Ha, Cheng, Newman, Bradley, Joshua, Chao, Alex, Mody, Apurva, Truitt, Steven, Metropolitansky, Dasha, Ness, Robert Osazuwa, Larson, Jonathan
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866929719697473536
author Edge, Darren
Trinh, Ha
Cheng, Newman
Bradley, Joshua
Chao, Alex
Mody, Apurva
Truitt, Steven
Metropolitansky, Dasha
Ness, Robert Osazuwa
Larson, Jonathan
author_facet Edge, Darren
Trinh, Ha
Cheng, Newman
Bradley, Joshua
Chao, Alex
Mody, Apurva
Truitt, Steven
Metropolitansky, Dasha
Ness, Robert Osazuwa
Larson, Jonathan
contents The use of retrieval-augmented generation (RAG) to retrieve relevant information from an external knowledge source enables large language models (LLMs) to answer questions over private and/or previously unseen document collections. However, RAG fails on global questions directed at an entire text corpus, such as "What are the main themes in the dataset?", since this is inherently a query-focused summarization (QFS) task, rather than an explicit retrieval task. Prior QFS methods, meanwhile, do not scale to the quantities of text indexed by typical RAG systems. To combine the strengths of these contrasting methods, we propose GraphRAG, a graph-based approach to question answering over private text corpora that scales with both the generality of user questions and the quantity of source text. Our approach uses an LLM to build a graph index in two stages: first, to derive an entity knowledge graph from the source documents, then to pregenerate community summaries for all groups of closely related entities. Given a question, each community summary is used to generate a partial response, before all partial responses are again summarized in a final response to the user. For a class of global sensemaking questions over datasets in the 1 million token range, we show that GraphRAG leads to substantial improvements over a conventional RAG baseline for both the comprehensiveness and diversity of generated answers.
format Preprint
id arxiv_https___arxiv_org_abs_2404_16130
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle From Local to Global: A Graph RAG Approach to Query-Focused Summarization
Edge, Darren
Trinh, Ha
Cheng, Newman
Bradley, Joshua
Chao, Alex
Mody, Apurva
Truitt, Steven
Metropolitansky, Dasha
Ness, Robert Osazuwa
Larson, Jonathan
Computation and Language
Artificial Intelligence
Information Retrieval
H.3.3; I.2.7
The use of retrieval-augmented generation (RAG) to retrieve relevant information from an external knowledge source enables large language models (LLMs) to answer questions over private and/or previously unseen document collections. However, RAG fails on global questions directed at an entire text corpus, such as "What are the main themes in the dataset?", since this is inherently a query-focused summarization (QFS) task, rather than an explicit retrieval task. Prior QFS methods, meanwhile, do not scale to the quantities of text indexed by typical RAG systems. To combine the strengths of these contrasting methods, we propose GraphRAG, a graph-based approach to question answering over private text corpora that scales with both the generality of user questions and the quantity of source text. Our approach uses an LLM to build a graph index in two stages: first, to derive an entity knowledge graph from the source documents, then to pregenerate community summaries for all groups of closely related entities. Given a question, each community summary is used to generate a partial response, before all partial responses are again summarized in a final response to the user. For a class of global sensemaking questions over datasets in the 1 million token range, we show that GraphRAG leads to substantial improvements over a conventional RAG baseline for both the comprehensiveness and diversity of generated answers.
title From Local to Global: A Graph RAG Approach to Query-Focused Summarization
topic Computation and Language
Artificial Intelligence
Information Retrieval
H.3.3; I.2.7
url https://arxiv.org/abs/2404.16130