SearchType
Enum defining the available search modes forcognee.search().
Values
The Retrieval source column shows what each type reads from: Vector (semantic similarity over embeddings), Graph (knowledge-graph traversal / Cypher), Vector + Graph (semantic seeds plus graph context β the βsemantics + graphβ combination), or Lexical (keyword matching, no embeddings). Types marked Varies pick or combine sources at runtime.Speed vs. accuracy
The biggest cost driver is how many LLM calls a search type makes. Retrieval-only modes return matches without any generation step and are the fastest; single-completion modes add one LLM call; iterative modes make several calls and scale with their round/iteration settings. The table below orders types roughly from fastest to slowest. βAccuracyβ here means how well-grounded and complete the answer tends to be β it depends on your data and query, so treat it as a relative guide, not a benchmark.To go faster: prefer
CHUNKS, SUMMARIES, or CHUNKS_LEXICAL (no LLM call), or pass only_context=True to skip the final completion on any type. To go more accurate: start with GRAPH_COMPLETION, then escalate to GRAPH_COMPLETION_DECOMPOSITION for multi-part questions or GRAPH_COMPLETION_COT for multi-hop reasoning β both trade latency for depth. Lowering max_iter / context_extension_rounds via retriever_specific_config reduces cost for the iterative modes. See Search Basics β Advanced Parameters.Choosing a Search Type
I want an LLM-generated answer grounded in my data
I want an LLM-generated answer grounded in my data
Use
GRAPH_COMPLETION (default) for the best balance of accuracy and context.
Use RAG_COMPLETION for a simpler chunk-based approach.I want raw data, not an LLM answer
I want raw data, not an LLM answer
Use
CHUNKS for semantic chunk retrieval or CHUNKS_LEXICAL for keyword-based.
Use SUMMARIES for pre-generated summaries.I want to query the graph directly
I want to query the graph directly
Use
CYPHER for raw Cypher queries or NATURAL_LANGUAGE to have cognee
translate your question to Cypher.I'm not sure which to use
I'm not sure which to use
Use
FEELING_LUCKY β cognee will pick the best search type for your query.I need more accurate or comprehensive answers from the graph
I need more accurate or comprehensive answers from the graph
All four graph-completion modes retrieve graph triplets and generate an LLM answer, but they differ in depth and latency:
See Search Basics β Advanced Parameters and Retrievers for full details.
Per-search-type parameters
Every type accepts the common parameters (query_text, top_k, system_prompt/system_prompt_path, only_context, verbose, include_references, datasets/dataset_ids, user, session_id) documented in Search Basics β Parameters Reference. The graph-completion family additionally honors the graph-ranking knobs (wide_search_top_k, triplet_distance_penalty, feedback_influence, neighborhood_depth, neighborhood_seed_top_k) and node-set filters. With recall(), use node_name and node_name_filter_operator; node_type is only exposed on lower-level search().
The accordions below list each search typeβs type-specific parameters. Most entries are passed through retriever_specific_config; when a search type uses a common parameter in a special way, that is noted.
SUMMARIES
SUMMARIES
CHUNKS
CHUNKS
CHUNKS_LEXICAL
CHUNKS_LEXICAL
RAG_COMPLETION
RAG_COMPLETION
HYBRID_COMPLETION
HYBRID_COMPLETION
TRIPLET_COMPLETION
TRIPLET_COMPLETION
GRAPH_COMPLETION
GRAPH_COMPLETION
GRAPH_COMPLETION_DECOMPOSITION
GRAPH_COMPLETION_DECOMPOSITION
GRAPH_SUMMARY_COMPLETION
GRAPH_SUMMARY_COMPLETION
GRAPH_COMPLETION_COT
GRAPH_COMPLETION_COT
GRAPH_COMPLETION_CONTEXT_EXTENSION
GRAPH_COMPLETION_CONTEXT_EXTENSION
TEMPORAL
TEMPORAL
CYPHER
CYPHER
NATURAL_LANGUAGE
NATURAL_LANGUAGE
CODING_RULES
CODING_RULES
AGENTIC_COMPLETION
AGENTIC_COMPLETION
Requires the resolved scope to contain exactly one dataset.
FEELING_LUCKY
FEELING_LUCKY
retriever_specific_config usage and Retrievers for per-retriever behavior.