Skip to main content

SearchType

Enum defining the available search modes for cognee.search().
from cognee import SearchType

results = await cognee.search("query", query_type=SearchType.GRAPH_COMPLETION)

Values

ValueDescription
SearchType.SUMMARIESPre-generated hierarchical summaries of content.
SearchType.CHUNKSRaw text segments matching semantically.
SearchType.RAG_COMPLETIONTraditional RAG: retrieve chunks, then LLM answer.
SearchType.TRIPLET_COMPLETIONRetrieve via triplet relationships, then LLM answer.
SearchType.GRAPH_COMPLETIONDefault. Full graph context with LLM completion. (default)
SearchType.GRAPH_SUMMARY_COMPLETIONGraph context with summary-enhanced completion.
SearchType.CYPHERDirect Cypher query against the graph database.
SearchType.NATURAL_LANGUAGENatural language translated to Cypher.
SearchType.GRAPH_COMPLETION_COTGraph completion with chain-of-thought reasoning.
SearchType.GRAPH_COMPLETION_CONTEXT_EXTENSIONGraph completion with extended context window.
SearchType.FEELING_LUCKYAuto-select the best search type for the query.
SearchType.TEMPORALTemporal-aware search for time-sensitive queries.
SearchType.CODING_RULESCode-specific retrieval (coding rules, codebase search).
SearchType.CHUNKS_LEXICALToken-based lexical chunk search (e.g. Jaccard similarity).

Choosing a Search Type

Use GRAPH_COMPLETION (default) for the best balance of accuracy and context. Use RAG_COMPLETION for a simpler chunk-based approach.
Use CHUNKS for semantic chunk retrieval or CHUNKS_LEXICAL for keyword-based. Use SUMMARIES for pre-generated summaries.
Use CYPHER for raw Cypher queries or NATURAL_LANGUAGE to have cognee translate your question to Cypher.
Use FEELING_LUCKY — cognee will pick the best search type for your query.