The Knowledge Base Retrieval Node is designed to query text content related to user questions from the Dify Knowledge Base, which can then be used as context for subsequent answers by the Large Language Model (LLM).Documentation Index
Fetch the complete documentation index at: https://dify-6c0370d8-feature-ignore-files-config.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Configuring the Knowledge Base Retrieval Node involves four main steps:
- Selecting the Query Variable
- Choosing the Knowledge Base for Query
- Applying Metadata Filtering
- Configuring the Retrieval Strategy
Dify 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.
