Retrieve chunks from a knowledge base chosen at runtime by dataset_id. Use it in place of the built-in knowledge retrieval node when each run must search a different dataset.
Author: xiaozie-xy
Version: 0.0.1
Type: Tool plugin
Dynamic Knowledge Retrieval is a Dify tool plugin. It searches the knowledge base identified by a dataset ID passed in at runtime.
The built-in knowledge retrieval node stores dataset IDs in the workflow graph, so one run cannot switch to another dataset. This plugin adds a parameter. Pass the knowledge base ID that matches the current task.
Upload on the Dify plugins page. If a self-hosted instance rejects the unsigned local package, turn off forced plugin signature checks in the deployment configuration and install it again. Then enter the knowledge API base URL and an API key scoped to all knowledge bases.
Configure these once. This key is not an application API key.
Bound from workflow variables
Set on the tool node
Bind the dataset ID and query for the current run. Leave attachment IDs and metadata conditions empty when they are not needed. Search method follows the dataset by default.
Top K, score threshold, the rerank model, and hybrid weights are set in the node's retrieval settings.
Search one knowledge base for the current task:
Include two attachments:
Hybrid search with custom weights and two metadata conditions:
Semantic first uses semantic weight 0.7 and keyword weight 0.3. Keyword first reverses those values. When rerank is off, the plugin sends weighted-score mode.
Field definitions follow the official docs: metadata filtering conditions.
must be one of the values below.
Creating, uploading, waiting for indexing, and deleting datasets stay with the caller. The target dataset's indexing status should be completed before this tool runs.
Some outbound calls build their address at runtime, so the list may be incomplete.
Last checked 10/13/2026 06:39 AM · version 0.0.1