From 3f204fbd9dba1ed1413a08f4f05be30637395133 Mon Sep 17 00:00:00 2001 From: Riskey Date: Wed, 24 Dec 2025 16:23:33 +0800 Subject: [PATCH] Optimize the knowledge retrieval page --- en/use-dify/nodes/knowledge-retrieval.mdx | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/en/use-dify/nodes/knowledge-retrieval.mdx b/en/use-dify/nodes/knowledge-retrieval.mdx index 9fe3930c..947ec8d6 100644 --- a/en/use-dify/nodes/knowledge-retrieval.mdx +++ b/en/use-dify/nodes/knowledge-retrieval.mdx @@ -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: ![Knowledge Retrieval Node Use Case](/images/knowledge_retrieval_node_example.png) - 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). -## Configure a Knowledge Retrieval Node + + 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). + + +## 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. - 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. LLM Node Configuration Example - - - 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). -