Search knowledge base node
Semantic search across one of your Anymize knowledge bases, finds the most relevant text chunks for your question. Tip: feed the hits as context into an AI agent's user prompt to build RAG answers. Learn how to configure it, map inputs and outputs, run a test and resolve common errors.
7 min readUpdated
What this node does
Semantic search across one of your Anymize knowledge bases, finds the most relevant text chunks for your question. Tip: feed the hits as context into an AI agent's user prompt to build RAG answers.
Use Search knowledge base as a clearly defined step in an anymize workflow.
- Processes one input.
- Provides one output for following steps.
- Runs as a regular step in the flow.
Set up the node
- 01Open a workflow and add Search knowledge base from the node catalog.
- 02Complete the required fields and map values from previous steps.
- 03Run the node with a small test record and inspect its output.
- 04Connect the successful output and activate the workflow after an end-to-end test.
Operations and modes
Search knowledge base has one focused purpose. Its available settings appear when you select the node.
Settings
| Field | Meaning | Area |
|---|---|---|
| Knowledge bases | Pick one or more knowledge bases, the block searches all of them in parallel and merges the best chunks together. | Standard |
| Search request | What to search for. Templates like {{ $json.message }} are resolved at runtime. | Standard |
| Number of hits | How many matching text passages come back. 5 is a good default; use 1 if you only need the single best hit. | Standard |
| Run once per item | Off (default): the node runs once for the whole input. On: if it receives several items (e.g. from Split Out), it runs once PER item, and {{ $json }} is that one item each time. This is how you work through a file list entry by entry. | Standard |
| If one item fails | "Skip" writes an `error` field for the failed item and keeps processing the rest, instead of losing the whole run to a single unreadable file. | Standard |
| Pause between items (milliseconds) | Wait before every run except the first. 1000 = 1 second per item. Useful when the other side would otherwise throttle you. Maximum 300000 (5 minutes). | Standard |
Inputs and outputs
| Input | Meaning | Type |
|---|---|---|
| query | Search request (question or keyword). | text |
| Output | Meaning | Type |
|---|---|---|
| results | Top-N relevant chunks with score + metadata. | json |
| top_chunk | Content of the most relevant chunk (score winner) across all selected KBs. | text |
| top_chunks | All chunk contents concatenated, drop straight into an AI agent prompt. | text |
| total | Number of chunks found (total across all selected KBs). | number |
| stats | Search stats (latency per KB, hit counts). | json |
This node can process lists item by item. Error handling and the delay between items are available in advanced settings.
Example and test run
RAG search in contract: begin with a small, recognizable record. Inspect the output and only map fields that are present there.
Test-run example
{
"query": "Wer hat den Schaden verursacht?"
}Access and security
Before activation, review which data enters this step and what its output contains.
Store keys and credentials in the protected connection manager. Never paste them into normal workflow fields, test data or descriptions.
Troubleshooting
- No output: inspect the latest run and confirm that the previous node returned the expected fields.
- Empty variable: open the previous step output and use a field name from the real test data.
- List processed once: enable per-item execution in advanced settings.