mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-27 13:28:32 +07:00
Optimize the knowledge retrieval page
This commit is contained in:
@@ -5,7 +5,7 @@ icon: "database"
|
||||
|
||||
## Introduction
|
||||
|
||||
You can use the Knowledge Retrieval node to integrate existing knowledge bases into your Chatflows or Workflows. The node searches specific knowledge for information relevant to queries and outputs results as contextual content for use in downstream nodes (e.g., LLMs).
|
||||
You can use the Knowledge Retrieval node to integrate existing knowledge bases into your Chatflows or Workflows. The node searches specific knowledge for information relevant to queries and outputs results as contextual content for use in downstream nodes (e.g., LLM).
|
||||
|
||||
Below is an example of using the Knowledge Retrieval node in a Chatflow:
|
||||
|
||||
@@ -20,10 +20,14 @@ Below is an example of using the Knowledge Retrieval node in a Chatflow:
|
||||

|
||||
|
||||
<Info>
|
||||
Before using a Knowledge Retrieval node, ensure that you have at least one available knowledge base. To learn about creating knowledge bases, see [Knowledge](/en/use-dify/knowledge/readme#create-knowledge).
|
||||
Before using the Knowledge Retrieval node, make sure at least one knowledge base is available. To learn about creating knowledge bases, see [Knowledge](/en/use-dify/knowledge/readme#create-knowledge).
|
||||
</Info>
|
||||
|
||||
## Configure a Knowledge Retrieval Node
|
||||
<Note>
|
||||
On Dify Cloud, knowledge retrieval operations are subject to rate limits based on the subscription plan. For more information, see [Knowledge Request Rate Limit](/en/use-dify/knowledge/knowledge-request-rate-limit).
|
||||
</Note>
|
||||
|
||||
## Configuration
|
||||
|
||||
To make the Knowledge Retrieval node work properly, you need to specify:
|
||||
|
||||
@@ -111,24 +115,20 @@ With metadata filtering enabled, the Knowledge Retrieval node only searches docu
|
||||
|
||||
The Knowledge Retrieval node outputs the retrieval results as a variable named `result`, which is an array of retrieved document chunks containing their content, metadata, title, and other attributes.
|
||||
|
||||
When the retrieval results contain image attachments, the `result` variable also includes a field named `files` containing image details.
|
||||
When the retrieval results contain image attachments, the `result` variable also includes a field named `files` containing image metadata.
|
||||
|
||||
## Use with LLM Nodes
|
||||
|
||||
To use the retrieval results to answer user questions in an LLM node:
|
||||
To use the retrieval results as context to answer user questions in an LLM node:
|
||||
|
||||
1. In the **Context** field, select the `result` variable of the Knowledge Retrieval node.
|
||||
|
||||
2. In the LLM prompt field, reference both the `Context` variable and the user input variable (e.g., `userinput.query` in Chatflows).
|
||||
2. In the prompt field, reference both the `Context` variable and the user input variable (e.g., `userinput.query` in Chatflows).
|
||||
|
||||
3. (Optional) If the LLM supports vision capabilities, enable **Vision** to allow it to interpret image attachments in the `Context` variable.
|
||||
3. (Optional) If the LLM supports vision capabilities (indicated by a **Vision** tag), enable **Vision** to let it interpret the retrieved images.
|
||||
|
||||
<Info>
|
||||
Once **Vision** is enabled, the LLM can directly understand images in the `Context` variable—you don't have to set a **Vision** input variable for this.
|
||||
Once **Vision** is enabled, the LLM automatically processes the retrieved images. You don't need to manually reference the `Context` variable again in the **Vision** input field.
|
||||
</Info>
|
||||
|
||||
<img src="/images/llm_node_configuration_example.png" alt="LLM Node Configuration Example" width="400"/>
|
||||
|
||||
<Note>
|
||||
On Dify Cloud, knowledge retrieval operations are subject to rate limits based on the subscription plan. For more information, see [Knowledge Request Rate Limit](/en/use-dify/knowledge/knowledge-request-rate-limit).
|
||||
</Note>
|
||||
|
||||
Reference in New Issue
Block a user