> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SearchType

> All available search modes

# SearchType

Enum defining the available search modes for `cognee.search()`.

```python theme={null}
from cognee import SearchType

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

## Values

| Value                                           | Description                                                                                                                |
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `SearchType.SUMMARIES`                          | Pre-generated hierarchical summaries of content.                                                                           |
| `SearchType.CHUNKS`                             | Raw text segments matching semantically.                                                                                   |
| `SearchType.RAG_COMPLETION`                     | Traditional RAG: retrieve chunks, then LLM answer.                                                                         |
| `SearchType.TRIPLET_COMPLETION`                 | Retrieve via triplet relationships, then LLM answer.                                                                       |
| `SearchType.GRAPH_COMPLETION`                   | **Default.** Full graph context with LLM completion. **(default)**                                                         |
| `SearchType.GRAPH_COMPLETION_DECOMPOSITION`     | Decomposes a complex query into focused subqueries, retrieves graph context per subquery, then synthesizes a final answer. |
| `SearchType.GRAPH_SUMMARY_COMPLETION`           | Graph context with summary-enhanced completion.                                                                            |
| `SearchType.CYPHER`                             | Direct Cypher query against the graph database.                                                                            |
| `SearchType.NATURAL_LANGUAGE`                   | Natural language translated to Cypher.                                                                                     |
| `SearchType.GRAPH_COMPLETION_COT`               | Graph completion with chain-of-thought reasoning.                                                                          |
| `SearchType.GRAPH_COMPLETION_CONTEXT_EXTENSION` | Graph completion with extended context window.                                                                             |
| `SearchType.FEELING_LUCKY`                      | Auto-select the best search type for the query.                                                                            |
| `SearchType.TEMPORAL`                           | Temporal-aware search for time-sensitive queries.                                                                          |
| `SearchType.CODING_RULES`                       | Code-specific retrieval (coding rules, codebase search).                                                                   |
| `SearchType.CHUNKS_LEXICAL`                     | Token-based lexical chunk search (e.g. Jaccard similarity).                                                                |

## Choosing a Search Type

<AccordionGroup>
  <Accordion title="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.
  </Accordion>

  <Accordion title="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.
  </Accordion>

  <Accordion title="I want to query the graph directly">
    Use `CYPHER` for raw Cypher queries or `NATURAL_LANGUAGE` to have cognee
    translate your question to Cypher.
  </Accordion>

  <Accordion title="I'm not sure which to use">
    Use `FEELING_LUCKY` — cognee will pick the best search type for your query.
  </Accordion>

  <Accordion title="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:

    | Mode                                 | Strategy                                                                                                    | Best for                                                              | Trade-off                                                     |
    | ------------------------------------ | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------- |
    | `GRAPH_COMPLETION`                   | Single-pass retrieval + completion                                                                          | Most queries — good accuracy, low latency                             | Baseline                                                      |
    | `GRAPH_COMPLETION_DECOMPOSITION`     | Decomposes query into 1–5 subqueries, retrieves graph context per subquery, then synthesizes a final answer | Multi-entity or multi-aspect questions (e.g. "Tell me about A and B") | One extra LLM call for decomposition; slightly higher latency |
    | `GRAPH_SUMMARY_COMPLETION`           | Graph context condensed via summaries before completion                                                     | Noisy or large graphs where a tighter context improves coherence      | Slightly slower; summary quality matters                      |
    | `GRAPH_COMPLETION_COT`               | Iterative: retrieve → answer → validate → follow-up (up to `max_iter` rounds, default 4)                    | Complex multi-hop questions where stepwise reasoning helps            | Higher latency; more LLM calls                                |
    | `GRAPH_COMPLETION_CONTEXT_EXTENSION` | Iterative: retrieve → generate → use output as new query (up to `context_extension_rounds`, default 4)      | Open-ended or exploratory queries needing a broader subgraph          | Higher latency; early convergence stops extra rounds          |

    See [Search Basics — Advanced Parameters](/guides/search-basics#advanced-parameters) and [Retrievers](/core-concepts/main-operations/legacy-operations/search#retrievers) for full details.
  </Accordion>
</AccordionGroup>
