> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
> Use this file 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.

| 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.   In Deep and Research, plans the search.   Changing it re-indexes every document and costs tokens. |
| **Embedding model** | Turns each chunk into a vector so questions can be matched to chunks by meaning.   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.  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.  Higher cutoffs keep only close matches and risk returning nothing; lower cutoffs let broader matches through. |

## 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.   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.   The slowest depth and the costliest in model tokens. For questions that need several searches to answer, not for direct questions. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.