Skip to main content
Graphiti provides powerful search capabilities to retrieve relevant information from your knowledge graph, combining semantic similarity, full-text search, and graph-based reranking. The simplest way to search is using the search() method, which returns relationship edges:

Search Methods

Graphiti uses hybrid search combining multiple retrieval methods:

Semantic Similarity

Finds results based on meaning using vector embeddings

BM25 Full-Text

Finds results based on keyword matching

Graph Traversal (BFS)

Explores connected nodes in the graph

Reranking

Combines and reorders results for optimal relevance

Search Parameters

Center Node Reranking

Rerank results based on their graph distance from a specific node:
This is useful for finding contextually related information around a specific entity.

Advanced Search with Configurations

For more control, use the search_() method with custom search configurations:

Search Configuration Recipes

Graphiti provides pre-configured search recipes optimized for different scenarios:

Edge Search Recipes

Search for relationships between entities:

Node Search Recipes

Search for entities:

Combined Search Recipes

Search across nodes, edges, episodes, and communities:

Community Search Recipes

Search for clusters of related entities:

Custom Search Configurations

Build your own search configuration:

Search Configuration Options

Search Methods

  • EdgeSearchMethod.cosine_similarity - Semantic vector search
  • EdgeSearchMethod.bm25 - Full-text keyword search
  • EdgeSearchMethod.bfs - Breadth-first graph traversal

Reranking Methods

RRF

Reciprocal Rank Fusion - Combines multiple search methods by rank

MMR

Maximal Marginal Relevance - Balances relevance and diversity

Node Distance

Reranks by graph distance from a center node

Cross Encoder

Neural reranking for highest accuracy

Episode Mentions

Reranks by frequency across episodes

Search Filters

Filter results by group, time, or custom criteria:

Search Results

The search_() method returns a SearchResults object with multiple result types:

Performance Tips

Limit Results

Set appropriate limit values to reduce latency

Use Group IDs

Filter by group_ids to search specific partitions

Simple Configs

Start with RRF reranking before using cross-encoder

Min Scores

Set reranker_min_score to filter low-quality results
Combine different search strategies:

Next Steps

Adding Episodes

Learn how to add content to your knowledge graph

Custom Entities

Define domain-specific entity types for better search