Search methods
GraphRAG offers four distinct search methods, each optimized for different query patterns:Local search
Entity-based search combining knowledge graph data with raw text chunks for specific entity questions
Global search
Dataset-wide reasoning using community reports in a map-reduce fashion for holistic questions
DRIFT search
Dynamic search combining global and local approaches with iterative follow-up questions
Basic search
Simple vector RAG over text chunks for comparison with advanced methods
Local search
Local search generates answers by combining relevant data from the AI-extracted knowledge graph with text chunks of the raw documents. This method is suitable for questions that require an understanding of specific entities mentioned in the documents.Example use case: “What are the healing properties of chamomile?”
- Entity-specific questions
- Questions requiring detailed context about particular items
- Queries where you know the specific entities involved
Global search
Global search generates answers by searching over all AI-generated community reports in a map-reduce fashion. This is a resource-intensive method that provides comprehensive responses for questions requiring an understanding of the dataset as a whole.Example use case: “What are the most significant values of the herbs mentioned in this notebook?”
- Dataset-wide thematic questions
- Questions requiring aggregation across multiple topics
- Queries about overall patterns and trends
DRIFT search
DRIFT Search (Dynamic Reasoning and Inference with Flexible Traversal) introduces a new approach to local search queries by including community information in the search process. It combines characteristics of both global and local search to generate detailed responses while balancing computational costs with quality outcomes.Key innovation: DRIFT expands the breadth of the query’s starting point and uses community insights to refine a query into detailed follow-up questions.
- Complex questions requiring both broad and detailed context
- Iterative exploration of topics
- Questions that benefit from hierarchical reasoning
Basic search
GraphRAG includes a rudimentary implementation of basic vector RAG to make it easy to compare different search results based on the type of question you are asking. You can specify the topk text unit chunks to include in the summarization context.
Purpose: Baseline comparison with traditional RAG approaches
Question generation
In addition to search capabilities, GraphRAG provides question generation functionality that takes a list of user queries and generates candidate follow-up questions. This is useful for:- Generating follow-up questions in a conversation
- Creating a list of questions for deeper dataset investigation
- Guiding exploratory analysis
Choosing a search method
Use this guide to select the appropriate search method for your use case:When to use local search
When to use local search
- You know specific entities in your question
- You need detailed information about particular items
- Your question focuses on relationships between known entities
- You want faster, more cost-effective searches
When to use global search
When to use global search
- You need to understand themes across the entire dataset
- Your question requires aggregation of information
- You’re asking about overall patterns or top-N items
- You need comprehensive, dataset-wide insights
When to use DRIFT search
When to use DRIFT search
- Your question is complex and multifaceted
- You want both broad context and specific details
- You need iterative refinement of the search
- You’re exploring unfamiliar domains
When to use basic search
When to use basic search
- You want to compare with traditional RAG
- Your use case is simple semantic similarity
- You need a baseline for evaluation
Next steps
Local search guide
Detailed documentation on entity-based search
Global search guide
Learn about dataset-wide reasoning
Configuration
Configure search parameters
API reference
Python API documentation