GraphRAG 檢索與查詢:底層運作原理¶
文章資訊
作者:QuarkAndCode 日期:2026-06-13
原文標題:GraphRAG Retrieval and Querying: How It Works Under the Hood
📝 重點摘要¶
TL;DR¶
GraphRAG 將平面文本塊轉成分層知識記憶,依問題類型選擇檢索層級。
核心問題¶
傳統向量 RAG 只比對相似文本塊,難以回答跨文件、多步驟或全語料庫的宏觀問題。GraphRAG 試圖透過預先建構的分層知識結構,讓模型同時能處理細節與整體性問題。
關鍵發現 / 數據¶
- Local Search 預設 token 預算分配:社群報告 25%、文本單元 50%、其餘給實體/關係/共變量,兼顧細節與廣度。
- 索引產出七類項目:文件、文本單元、實體、關係、claims、社群、社群報告;查詢引擎拉取社群報告的頻率不亞於原始文本。
- 微軟原論文顯示 GraphRAG 在大型資料集的宏觀問題上,於完整性與多樣性遠勝標準 RAG。
- 2025 年研究(Han et al.)指出:傳統 RAG 在簡單細節題更佳,GraphRAG 在多步驟與宏觀摘要更強。
- 新方法動態社群選擇用 LLM 由頂層逐步剪枝,只深入相關分支,降低全域搜尋成本。
方法亮點¶
- 四種查詢模式:Basic(純向量)、Local(實體入口)、Global(社群報告 map-reduce)、DRIFT(局部+全域混合探索)。
- Global Search 採 map-reduce:每塊報告產生中間答案與 helpfulness 分數(JSON),reduce 依分數排序取最有用者。
- DRIFT 以 DriftAction 追蹤 query/answer/score/follow-up,做引導式逐步探索,可擴展或停止。
- 索引為「由下而上」分層:文本→實體/關係/claims→社群→報告,並保留 provenance 與短 ID 供交叉引用。
對我的研究有用嗎?¶
頗具參考價值。Local Search 的 token 預算三分法、Global Search 的 map-reduce 評分機制,是 context engineering 的具體可借鏡設計。動態社群選擇用 LLM 剪枝控制檢索擴張,對降低 GraphRAG 成本與可控檢索的研究方向很有啟發。文中也誠實點出限制:基礎版用精確字串匹配做實體解析、索引品質直接影響檢索,值得在設計實驗時注意。
評語¶
入門到中階的優質科普,結構清晰且附原始碼路徑佐證;非原創研究、無新實驗,適合快速掌握 GraphRAG 機制,深度研究者只需略讀。
🌐 中英對照¶
Author: QuarkAndCode
Published:
Source: https://medium.com/@QuarkAndCode/graphrag-retrieval-and-querying-how-it-works-under-the-hood-e24737596893
Fetched: 2026-06-13T00:00:32.255531
GraphRAG Retrieval and Querying: How It Works Under the Hood / GraphRAG 檢索與查詢:底層運作原理¶
Press enter or click to view image in full size
按 enter 或點擊以檢視完整尺寸圖片

GraphRAG retrieval works in two main steps. First, it creates a structured index from raw documents. When you ask a question, it uses this structure to decide what evidence to include in the model’s context.
GraphRAG 的檢索主要分為兩個步驟。首先,它會從原始文件建立一個結構化的索引 (index)。當你提出問題時,它會運用這個結構來決定要把哪些證據納入模型的脈絡 (context) 之中。
Unlike plain vector RAG, which just looks for similar text chunks, GraphRAG also considers which entities are important, how they connect, and which community summaries capture the bigger picture. This makes GraphRAG especially good at handling complex, multi-step questions and whole-corpus queries, while standard RAG is still better for quick, detail-focused searches.
與單純的向量 RAG (vector RAG) 只尋找相似的文字區塊 (text chunks) 不同,GraphRAG 還會考量哪些實體 (entities) 是重要的、它們之間如何連結,以及哪些社群摘要 (community summaries) 能掌握整體大局。這使得 GraphRAG 特別擅長處理複雜的多步驟問題以及涵蓋整個語料庫 (whole-corpus) 的查詢,而標準 RAG 在快速、聚焦細節的搜尋上仍然較為出色。
GraphRag Does Most of Its Hard Work Before Retrieval Starts / GraphRAG 大部分的繁重工作都在檢索開始之前完成¶
Before you ask a question, GraphRAG breaks documents into TextUnits, small, manageable units used for analysis and retrieval. It then extracts entities, relationships, and optional claims from these pieces, identifies communities in the graph, generates community reports, and generates embeddings for items that will need vector lookups later. In short, GraphRAG works because it converts raw text into a layered knowledge model in advance.
在你提出問題之前,GraphRAG 會先把文件拆解成文字單元 (TextUnits),這是用於分析與檢索的小型、易於處理的單位。接著它會從這些片段中擷取出實體、關係 (relationships) 以及選用的主張 (claims),辨識出圖中的社群 (communities),產生社群報告 (community reports),並為之後需要向量查找 (vector lookups) 的項目產生嵌入向量 (embeddings)。簡而言之,GraphRAG 之所以有效,是因為它事先就把原始文字轉換成一個分層的知識模型 (layered knowledge model)。
The indexing process does more than just build a graph. It creates separate items for documents, text units, entities, relationships, claims or covariates, communities, and community reports. Community reports include more than a brief summary — they have a title, summary, full report, rank, rating explanation, and a list of findings. This is important because GraphRAG’s query engine often pulls these reports as often as it pulls raw source text.
索引建立的過程不只是建構一張圖而已。它會為文件、文字單元、實體、關係、主張或共變量 (covariates)、社群以及社群報告各自建立獨立的項目。社群報告不只包含一段簡短的摘要——它們還有標題、摘要、完整報告、排名 (rank)、評分說明 (rating explanation),以及一份發現 (findings) 清單。這一點很重要,因為 GraphRAG 的查詢引擎常常會像調用原始來源文字一樣頻繁地調用這些報告。
You can think of the index as a semantic map with different zoom levels. At the lowest level, GraphRAG links back to the original text. In the middle, it stores entities, relationships, and claims. At higher levels, it keeps community summaries that capture the main themes of larger sections. The Microsoft Research paper calls this a bottom-up process: it summarizes lower-level communities first, then builds higher-level summaries from them.
你可以把這個索引想像成一張具有不同縮放層級的語意地圖 (semantic map)。在最底層,GraphRAG 會連回到原始文字。在中間層,它儲存實體、關係與主張。在較高的層級,它保留能掌握較大段落主要主題的社群摘要。微軟研究院 (Microsoft Research) 的論文稱這是一個由下而上 (bottom-up) 的過程:它先摘要較低層級的社群,再從中建構出較高層級的摘要。
The Query Engine Is Really a Context Builder / 查詢引擎其實是一個脈絡建構器¶
In open-source GraphRAG, there isn’t just one universal retrieval method. The query engine offers different modes: Basic Search, Local Search, Global Search, and DRIFT Search. Each mode builds context in its own way and fits different types of questions. This separation matters because GraphRAG recognizes that no single retrieval path works for every query.
在開源版的 GraphRAG 中,並沒有單一的通用檢索方法。查詢引擎提供了不同的模式:基本搜尋 (Basic Search)、區域搜尋 (Local Search)、全域搜尋 (Global Search),以及 DRIFT 搜尋 (DRIFT Search)。每種模式都以自己的方式建構脈絡,並適用於不同類型的問題。這樣的區分很重要,因為 GraphRAG 體認到沒有任何單一的檢索路徑能適用於所有查詢。
Basic Search works much like a standard vector RAG. It pulls the top text units and summarizes them. Microsoft includes this mode so users can compare plain vector retrieval with graph-aware retrieval on the same data. This is important: GraphRAG doesn’t replace vector search. Instead, it adds layers but still uses vector search when a question is best answered by a few close chunks.
基本搜尋的運作方式很像標準的向量 RAG。它會調出最相關的文字單元並加以摘要。微軟納入這個模式,是為了讓使用者能在相同資料上比較單純的向量檢索與圖感知 (graph-aware) 檢索。這一點很重要:GraphRAG 並沒有取代向量搜尋。相反地,它增加了層次,但當一個問題最適合由少數幾個相近的區塊來回答時,它仍然會使用向量搜尋。
How Local Search works under the hood / 區域搜尋在底層如何運作¶
Local Search is designed for questions focused on a specific person, company, event, product, or concept. The process starts by matching your query to entity description embeddings. The matched entities become entry points into the graph. Then GraphRAG imports related entities, relationships, community reports, covariates, and linked text chunks from the original documents.
區域搜尋是為了聚焦於特定人物、公司、事件、產品或概念的問題而設計的。這個流程會先把你的查詢與實體描述嵌入向量 (entity description embeddings) 進行比對。比對到的實體會成為進入圖的入口點 (entry points)。接著 GraphRAG 會從原始文件匯入相關的實體、關係、社群報告、共變量,以及連結的文字區塊。
One interesting part of Local Search is that it doesn’t just include everything related to those entities in the prompt. Instead, the context builder splits the token budget into three parts: community context, local graph context, and source text units. By default, 25% goes to community reports, 50% to text units, and the rest to entities, relationships, and covariates. This way, the model gets both a detailed and broader context, rather than having to choose between graph facts and raw text.
區域搜尋一個有趣的地方在於,它並不會把所有與那些實體相關的內容全部放進提示 (prompt) 裡。相反地,脈絡建構器會把詞元預算 (token budget) 分成三個部分:社群脈絡、區域圖脈絡,以及來源文字單元。在預設情況下,25% 分配給社群報告、50% 給文字單元,其餘則分給實體、關係與共變量。如此一來,模型既能得到細節豐富、又能得到較廣泛的脈絡,而不必在圖中的事實與原始文字之間二擇一。
The ranking process in Local Search is more thoughtful than it might seem. Communities are ordered by the number of mapped entities and by rank. Text units are collected from these entities and then sorted by entity order and relationship density. The final prompt is built after this filtering, which is why Local Search often gives more precise results than just picking the nearest chunks for entity-heavy questions.
區域搜尋中的排序過程比表面看起來更為縝密。社群會依照所對應到的實體數量以及排名來排序。文字單元則從這些實體中蒐集而來,再依實體順序與關係密度 (relationship density) 進行排序。最終的提示是在經過這層篩選之後才建構出來的,這也是為什麼對於實體密集 (entity-heavy) 的問題,區域搜尋往往能給出比單純挑選最相近區塊更精準的結果。
How Global Search Works Under the Hood / 全域搜尋在底層如何運作¶
Global Search is a key feature of GraphRAG. It’s meant for questions about the whole dataset, like “What changed across the dataset?”, “What are the main themes?”, or “How do the viewpoints differ overall?” The official docs say it works like a map-reduce process over community reports at a chosen level. Lower levels give more detailed answers but cost more to process because there are more reports.
全域搜尋是 GraphRAG 的一項關鍵功能。它是為了針對整個資料集 (dataset) 的問題而設計的,例如「整個資料集發生了哪些變化?」、「主要的主題有哪些?」,或是「整體而言各種觀點有何不同?」官方文件指出,它的運作方式就像是在所選定層級的社群報告上進行一個 map-reduce 的過程。較低的層級能提供更詳細的答案,但因為報告較多,處理的成本也較高。
The paper explains how this works: for a chosen community level, reports are shuffled and split into chunks. Each chunk goes through a map step, during which the model generates an intermediate answer and a helpfulness score. Then, GraphRAG runs a reduce step, sorting these points by score, keeping the most useful ones that fit the token budget, and then asks the model for the final answer. In the current code, these map outputs are in JSON format, with scores, and the reduce step sorts them by importance before building the final context.
論文解釋了這是如何運作的:對於選定的社群層級,報告會被打亂並切分成多個區塊。每個區塊都會經過一個 map(映射) 步驟,在此過程中模型會產生一個中間答案以及一個有用性分數 (helpfulness score)。接著,GraphRAG 會執行一個 reduce(歸約) 步驟,依分數對這些要點排序,保留在詞元預算範圍內最有用的部分,然後請模型給出最終答案。在目前的程式碼中,這些 map 的輸出是帶有分數的 JSON 格式,而 reduce 步驟會在建構最終脈絡之前依重要性對它們進行排序。
This design shows why Global Search can handle questions that basic RAG struggles with. A standard vector search just returns a few chunks that are similar to the query. But questions about the whole dataset aren’t really about a few chunks — they need a summary of the whole collection. GraphRAG works well here because its community reports already capture the big picture before you even ask a question.
這樣的設計說明了為什麼全域搜尋能處理基本 RAG 難以應付的問題。標準的向量搜尋只會回傳幾個與查詢相似的區塊。但關於整個資料集的問題,本質上並不是關於少數幾個區塊——它們需要的是對整個集合的摘要。GraphRAG 在這方面表現出色,因為早在你提出問題之前,它的社群報告就已經掌握了整體大局。
DRIFT Search Is the Hybrid Layer / DRIFT 搜尋是混合層¶
DRIFT Search was introduced to balance local precision with global coverage. According to the docs, it starts with relevant community reports, creates a broad initial answer and follow-up questions, and then uses a local search approach to find more specific evidence. In short, DRIFT avoids the narrow focus of pure local search without incurring the full cost of global search every time.
引入 DRIFT 搜尋是為了在區域的精準度與全域的涵蓋範圍之間取得平衡。根據文件,它會從相關的社群報告開始,先產生一個廣泛的初始答案以及後續追問的問題,然後再運用區域搜尋的方法去尋找更具體的證據。簡而言之,DRIFT 既避免了純區域搜尋過於狹隘的聚焦,又不必每次都承擔全域搜尋的完整成本。
The code supports this idea. DriftAction tracks a query, an answer, a score, and follow-up actions. When it runs, it calls the search engine with both local and global queries, reads a structured response with an answer, score, and follow-up questions, and then builds a sequence of next steps. So, DRIFT isn’t just local search with extra context — it’s more like a guided, step-by-step exploration that can expand or stop depending on what it finds.
程式碼也印證了這個想法。DriftAction 會追蹤一個查詢、一個答案、一個分數,以及後續的動作。當它執行時,會同時以區域與全域查詢呼叫搜尋引擎,讀取一個包含答案、分數與後續問題的結構化回應,然後建構出一連串接下來的步驟。因此,DRIFT 不只是加上額外脈絡的區域搜尋——它更像是一種有引導、逐步進行的探索,能依據它所發現的內容來擴展或停止。
This approach is helpful when a question sounds specific but actually needs a broader context. For example, a question about a product recall, an executive, or an incident might require information from the surrounding community to be fully accurate. DRIFT is made for these situations. Microsoft’s DRIFT write-up also says it helps when a user’s question doesn’t fit the extraction templates used during indexing.
當一個問題聽起來很具體、但實際上卻需要更廣泛脈絡時,這種做法就很有幫助。例如,一個關於產品召回、某位高階主管或某起事件的問題,可能需要周遭社群的資訊才能做到完全準確。DRIFT 正是為這些情境而打造的。微軟關於 DRIFT 的說明文章也指出,當使用者的問題不符合索引建立期間所使用的擷取範本 (extraction templates) 時,它也能有所助益。
What GraphRAG is Really Retrieving / GraphRAG 真正在檢索的是什麼¶
Many articles say GraphRAG is mainly about “querying a graph,” but that’s only part of the story. In reality, GraphRAG retrieves different types of items: entities, relationships, optional claims, community reports, and raw text units. The graph helps decide what goes together, but the final answer comes from an LLM using a carefully built prompt. So, GraphRAG is more like a system that packs evidence using the graph, not just a graph traversal tool.
許多文章說 GraphRAG 主要是在「查詢一張圖」,但這只說了故事的一部分。實際上,GraphRAG 檢索的是不同類型的項目:實體、關係、選用的主張、社群報告,以及原始文字單元。圖有助於決定哪些內容該放在一起,但最終答案是由大型語言模型 (LLM) 使用一個精心建構的提示產生的。因此,GraphRAG 更像是一個運用圖來打包證據的系統,而不只是一個圖遍歷 (graph traversal) 工具。
This is why provenance is important. Text units stay linked to their original documents, and communities keep links to entities, relationships, and text units. Short, easy-to-read IDs are created to enable cross-referencing outputs. GraphRAG’s goal is to give the model a richer set of evidence, not just a more complicated retrieval score.
這就是為什麼來源出處 (provenance) 很重要。文字單元始終與它們的原始文件保持連結,而社群則保留著與實體、關係和文字單元之間的連結。系統會建立簡短、易讀的識別碼 (ID),以便對輸出進行交叉參照。GraphRAG 的目標是提供給模型一組更豐富的證據,而不只是一個更複雜的檢索分數。
Why GraphRAG Can Outperform Standard RAG — And When It May Not / 為什麼 GraphRAG 能勝過標準 RAG——以及它在什麼情況下可能不會¶
GraphRAG works best when a question needs to pull together facts from different places, when answers exist at several levels of detail, or when the user doesn’t know the exact keywords to use. Microsoft’s original paper found that GraphRAG performed much better than standard RAG on big-picture questions in large datasets, especially in terms of thoroughness and variety.
當一個問題需要把來自不同地方的事實整合在一起、當答案存在於多個不同的細節層級,或當使用者不知道該用哪些確切關鍵字時,GraphRAG 的表現最為出色。微軟最初的論文發現,在大型資料集的整體大局類問題上,GraphRAG 的表現遠勝於標準 RAG,尤其是在完整性 (thoroughness) 與多樣性 (variety) 方面。
However, GraphRAG doesn’t replace vector RAG in every case. A 2025 study found that traditional RAG often does better on simple, detail-heavy questions, while GraphRAG is stronger for multi-step questions and broader summaries. This fits with how the systems are built. GraphRAG requires extra work up front to build its structure, so if you just need a specific fact from a couple of passages, plain retrieval might be simpler.
然而,GraphRAG 並非在所有情況下都能取代向量 RAG。2025 年的一項研究發現,傳統 RAG 在簡單、細節密集的問題上往往表現更好,而 GraphRAG 則在多步驟問題與較廣泛的摘要上更為強大。這與這些系統的建構方式是相符的。GraphRAG 需要事先投入額外的工作來建立其結構,所以如果你只是想從少數幾段文字中取得某個特定事實,單純的檢索可能會更簡單。
Another practical limit is the quality of the index. GraphRAG’s documentation recommends prompt tuning, as better, domain-specific prompts strengthen the knowledge graph. The paper also points out that the basic version uses exact string matching for entity resolution, even though softer matching could be used. If the graph is noisy, the retrieval layer will be affected as well.
另一個實務上的限制是索引的品質。GraphRAG 的文件建議進行提示調校 (prompt tuning),因為更好、更貼合特定領域的提示能強化知識圖譜 (Knowledge Graph)。論文也指出,基本版本在實體解析 (entity resolution) 上使用的是精確字串比對 (exact string matching),儘管其實可以採用較寬鬆的比對方式。如果圖本身雜訊很多,檢索層也會跟著受到影響。
A Recent Improvement: Dynamic Community Selection / 近期的一項改進:動態社群選擇¶
A recent development from Microsoft Research is dynamic community selection for global search. Instead of picking a fixed community level and summarizing every report, this new method starts at the top of the hierarchy, uses an LLM to check if a report is relevant, removes irrelevant branches, and only goes deeper into the parts of the graph that matter for the question. This makes global search more flexible and can reduce unnecessary processing.
微軟研究院近期的一項進展是用於全域搜尋的動態社群選擇 (dynamic community selection)。這個新方法不再挑選一個固定的社群層級並摘要每一份報告,而是從階層結構 (hierarchy) 的頂端開始,運用 LLM 來檢查某份報告是否相關,移除不相關的分支,並只往下深入到對該問題真正重要的圖的部分。這使得全域搜尋更具彈性,並能減少不必要的處理。
This new approach is important because it helps GraphRAG deliver broad, corpus-level insights without the high cost of processing the whole dataset every time. It also highlights a key point: the graph isn’t just for show. It’s used to control how retrieval expands, narrows, and focuses evidence before generating an answer.
這個新做法之所以重要,是因為它能讓 GraphRAG 提供廣泛的、語料庫層級的洞見,又不必每次都付出處理整個資料集的高昂成本。它也凸顯了一個關鍵重點:這張圖並不只是擺著好看的。它被用來控制檢索在產生答案之前如何擴展、收斂並聚焦證據。
Final Takeaway / 最終要點¶
The easiest way to explain GraphRAG retrieval is that it swaps a flat pool of chunks for a layered memory system. Raw text turns into text units. Text units become entities, relationships, and optional claims. These form communities, which then become reports. When you ask a question, GraphRAG selects the appropriate layer or layers for your query. That’s why it can answer both specific and broad questions better than plain vector search.
要解釋 GraphRAG 檢索最簡單的方式,就是它把一個扁平的區塊集合換成了一個分層的記憶系統 (layered memory system)。原始文字轉變成文字單元。文字單元成為實體、關係與選用的主張。這些再構成社群,而社群接著成為報告。當你提出問題時,GraphRAG 會為你的查詢選擇適當的一個或多個層級。這就是為什麼它在回答具體問題與廣泛問題時,都能比單純的向量搜尋表現得更好。
FAQ / 常見問答¶
Is GraphRAG just vector search with a graph added on top?
GraphRAG 只是在向量搜尋上面加了一張圖而已嗎?
No. GraphRAG still uses embeddings, but it also builds a knowledge graph, organizes information into communities, and creates community reports. It uses different query modes to put together context from these pieces. Basic Search is the vector-only option, while Local, Global, and DRIFT use the graph structure.
不是。GraphRAG 確實仍然使用嵌入向量,但它同時也建構了一個知識圖譜、把資訊組織成社群,並建立社群報告。它使用不同的查詢模式來從這些片段中組合出脈絡。基本搜尋是純向量的選項,而區域、全域與 DRIFT 則運用了圖的結構。
When should you use Local Search, Global Search, or DRIFT Search?
你應該在什麼時候使用區域搜尋、全域搜尋或 DRIFT 搜尋?
Use Local Search for questions about specific entities, Global Search for questions that need a summary of the whole dataset, and DRIFT when a question seems specific but needs broader context. This division is built into the official documentation and query design.
針對特定實體的問題使用區域搜尋;針對需要整個資料集摘要的問題使用全域搜尋;而當一個問題看似具體、卻需要更廣泛脈絡時則使用 DRIFT。這樣的劃分已內建於官方文件與查詢設計之中。
Does GraphRAG remove the need for standard RAG?
GraphRAG 是否消除了對標準 RAG 的需求?
Not really. It’s better to see GraphRAG and standard RAG as complementary. GraphRAG is usually better for multi-step reasoning and broad summaries, while standard RAG is still best for quick, precise, detail-focused searches.
並非如此。把 GraphRAG 與標準 RAG 視為互補關係會更恰當。GraphRAG 通常更適合多步驟推理與廣泛的摘要,而標準 RAG 在快速、精準、聚焦細節的搜尋上仍然最為出色。
References / 參考資料¶
- Microsoft GraphRAG documentation: Welcome, Indexing Overview, Indexing Dataflow, Query Overview, Local Search, Global Search, DRIFT Search, Outputs, and Auto Prompt Tuning.
微軟 GraphRAG 文件:Welcome、Indexing Overview、Indexing Dataflow、Query Overview、Local Search、Global Search、DRIFT Search、Outputs,以及 Auto Prompt Tuning。
- Microsoft Research Blog, GraphRAG: Facilitating LLM exploration of confidential narrative data.
微軟研究院部落格,《GraphRAG: Facilitating LLM exploration of confidential narrative data》。
- Microsoft Research Blog, GraphRAG: New tool for complex data discovery now on GitHub.
微軟研究院部落格,《GraphRAG: New tool for complex data discovery now on GitHub》。
- Microsoft Research Blog, Introducing DRIFT Search: Integrating global and local search methodologies to enhance quality and efficiency.
微軟研究院部落格,《Introducing DRIFT Search: Integrating global and local search methodologies to enhance quality and efficiency》。
- Microsoft Research Blog, GraphRAG: Improving global search via dynamic community selection.
微軟研究院部落格,《GraphRAG: Improving global search via dynamic community selection》。
- Haoyu Han et al., RAG vs. GraphRAG: A Systematic Evaluation and Key Insights (arXiv, 2025).
Haoyu Han 等人,《RAG vs. GraphRAG: A Systematic Evaluation and Key Insights》(arXiv,2025 年)。
- Microsoft GraphRAG source code: local_search/search.py, local_search/mixed_context.py, global_search/search.py, and drift_search/action.py.
微軟 GraphRAG 原始碼:local_search/search.py、local_search/mixed_context.py、global_search/search.py,以及 drift_search/action.py。
🔤 關鍵術語¶
| 英文 | 繁中譯名 | 文章中的脈絡 / 簡短說明 |
|---|---|---|
| GraphRAG | 圖譜檢索增強生成 | 結合知識圖譜與向量檢索的 RAG 系統,先建層級化索引再依問題挑選證據層 |
| Vector RAG | 向量檢索增強生成 | 傳統 RAG,僅以相似度尋找接近的文字片段,適合精確、細節型問題 |
| TextUnits | 文字單元 | 文件被切分出的小型可管理單位,作為分析與檢索的基礎 |
| Entities | 實體 | 從文字單元中抽取的人、公司、事件、產品或概念等節點 |
| Relationships | 關係 | 實體之間的連結,構成知識圖譜的邊 |
| Claims / Covariates | 主張/共變量 | 從文字中選擇性抽取的陳述事實,作為檢索項目之一 |
| Community | 社群 | 圖譜中彼此緊密連結的實體群組,可分層級 |
| Community Reports | 社群報告 | 對社群產生的摘要,含標題、摘要、完整報告、排名、評分說明與發現清單 |
| Community Summaries | 社群摘要 | 捕捉較大段落主題的高層級摘要 |
| Embeddings | 嵌入向量 | 為需向量查找的項目生成的向量表示 |
| Entity Description Embeddings | 實體描述嵌入 | Local Search 將查詢比對至此,作為進入圖譜的入口點 |
| Knowledge Graph | 知識圖譜 | 由實體、關係、社群組成的分層知識模型 |
| Local Search | 區域檢索 | 針對特定實體(人/公司/事件等)的查詢模式 |
| Global Search | 全域檢索 | 針對整個資料集的主題、變化或觀點差異的查詢模式 |
| Basic Search | 基礎檢索 | 等同純向量 RAG 的模式,供與圖譜檢索比較 |
| DRIFT Search | DRIFT 檢索 | 結合區域精準與全域涵蓋的混合式、逐步探索檢索模式 |
| Map-Reduce | 映射—歸納 | Global Search 對社群報告分塊映射出中間答案與分數,再歸納排序產出最終答案 |
| Token Budget | Token 預算 | 上下文建構器在社群、圖譜與來源文字間分配的字元配額(如 25%/50%) |
| Entity Resolution | 實體解析 | 基礎版以精確字串比對來合併同一實體 |
| Provenance | 出處溯源 | 文字單元與社群保留回連原文件與實體的可交叉引用連結 |
| Dynamic Community Selection | 動態社群選擇 | 由 LLM 自頂向下判斷報告相關性、剪除無關分支以降低全域檢索成本 |
| Prompt Tuning | 提示詞調校 | 以領域特定提示強化知識圖譜品質的建議做法 |