> ## Documentation index
> Fetch the complete documentation index at: https://dify-docs.docs7.io/llms.txt
> Ask it with GET https://dify-docs.docs7.io/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.

# Retrieval Settings

> Control how retrieval searches and ranks chunks in your knowledge base

These settings live under the knowledge base's **Settings** > **Retrieval**.

<Tip>
    Adjust one setting at a time and retest, so you can tell whether each change worked.
</Tip>

| Setting | What it does |
|:--------|:-------------|
| **System reasoning model** | During indexing, splits documents into chunks and sections by meaning, writes a summary per section, and builds a knowledge graph: a map of the subjects each chunk mentions and how they connect. <br/><br/> In Deep and Research, plans the search. <br/><br/> Changing it costs no tokens: documents already indexed keep what the previous model built. To rebuild a document with the new model, click **Re-index** on it. |
| **Embedding model** | Turns each chunk into a vector so questions can be matched to chunks by meaning. <br/><br/> Changing it regenerates vectors for every document and costs tokens. |
| **Rerank model** | Ranks the retrieved chunks by relevance and assigns each a score. |
| **Retrieval depth** | How far each search goes. See [Retrieval Depth](#retrieval-depth) below. |
| **TOP K** | The maximum number of chunks a search returns. <br/><br/>Higher values give more context but more noise; lower values stay focused but can miss relevant chunks. |
| **Score Threshold** | Drops chunks scoring below a cutoff you set. <br/><br/>Higher cutoffs keep only close matches and risk returning nothing; lower cutoffs let broader matches through. |

## Retrieval Depth {#retrieval-depth}

All three depths use the embedding and rerank models. Deep and Research also use the reasoning model.

| Depth | What it does |
|:------|:-------------|
| **Fast** | Matches your question against chunks by meaning and by keywords. The quickest depth, and enough for most direct questions. Start here. |
| **Deep** | Casts a wider net than Fast, and follows the knowledge graph from your question to chunks about related subjects. Slower. <br/><br/> Lean on it when answers span related subjects and Fast keeps missing them. |
| **Research** | Breaks a complex question into sub-questions, searches each widely, and uses section titles and summaries to decide which sections to read. <br/><br/> The slowest depth and the costliest in model tokens. For questions that need several searches to answer, not for direct questions. |
