# Knowledge Retrieval

The Knowledge Base Retrieval Node is designed to fetches relevant text content from a [Knowledge Base](/getting-started/knowledge-base.md), which can then be used as context for subsequent answers by the Large Language Model (LLM).

<figure><img src="/files/9QvAMVZEvYzcDrRXP8mQ" alt=""><figcaption></figcaption></figure>

Configuring the Knowledge Base Retrieval Node involves three main steps:

1. **Selecting the Query Variable**
2. **Choosing the Knowledge Base for Query**
3. **Configuring the Retrieval Strategy**

**Selecting the Query Variable**

The query variable typically corresponds to the user's input question, which is essential for retrieving relevant information from the knowledge base that aligns with the user's query. In this context, the query variable is `class_name`, which is the output of the question classifier node. For example, if the classifier identifies the issue as related to hardware, `class_name` would be set to `hardware Issue`.

**Choosing the Knowledge Base for Query**

Within the knowledge base retrieval node, you can add an existing knowledge base from Rnet. For instructions on creating a knowledge base within Rnet, please refer to the [<mark style="color:blue;">knowledge base</mark>](/getting-started/knowledge-base.md)

**Configuring the Retrieval Strategy**

It's possible to modify the indexing strategy and retrieval mode for an individual knowledge base within the node. For a detailed explanation of these settings, refer to the knowledge base [help documentation](https://docs.dify.ai/guides/knowledge-base/retrieval-test-and-citation) Rnet offers two recall strategies for different knowledge base retrieval scenarios: "**N-to-1 Recall**" and "**Multi-way Recall**". In the N-to-1 mode, knowledge base queries are executed through function calling, requiring the selection of a system reasoning model. In the multi-way recall mode, a Rerank model needs to be configured for result re-ranking. For a detailed explanation of these two recall strategies, refer to the retrieval mode explanation in the [help documentation](https://docs.dify.ai/guides/knowledge-base/create-knowledge-and-upload-documents#id-5-indexing-methods).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rnet.ai/getting-started/workflow/node-overview/knowledge-retrieval.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
