All nodes/AI/RAG
RAG Tool
Exposes the knowledge base as a tool for the AI Agent. The agent itself decides when to run the search. Connects via link_extension. Unlike RAG Query, it is invoked by the agent rather than deterministically.
Type in the graph: rag_tool
Tool
Try it
Minimal working workflow
- Execute + Data
- Extension
- LLM
- Memory
- Execute + Data + Streaming
Pick your own connection or knowledge base first — the graph carries REPLACE_ME.
When to use it
RAG Tool hands a knowledge base to an agent: whether to search, and with which wording, is the model’s decision. That is the right choice when the base is not needed for every question (“how much is delivery” — yes, “hi” — no), or when the query still has to be composed out of what the user wrote. If the context is always needed and always the same, use RAG Query: it costs fewer rounds and its result is visible in the graph.
How it works
The node takes no part in the execution chain. Its output goes over a link_extension wire into the
Extensions port of AI Agent, and the agent declares a function with one
string argument, query, to the model. The function name is the Tool Name field, and the Tool
Description field is the only thing by which the model judges when this call is appropriate.
The result reaches the model as text: a numbered list of the fragments found, with their score. Two
special cases are kept apart on purpose — “nothing matched” is something the model should report to the
user, while a missing base arrives as an explicit error so the model does not invent an answer in its
place.
Every search parameter — base, Top K, threshold, context window, metadata filters — comes only from this node’s own fields: it has no input ports, so a Knowledge Base node cannot be attached. The filters are fixed by the config; the model neither passes nor bypasses them.
Common mistakes
- No base selected. The field is required; the graph fails validation before a run.
- Leaving the default description. “Search the knowledge base” says nothing about the content, so the model either calls the tool at the wrong moment or never calls it. Write down what the base holds and which questions it answers.
- Two tools with the same name. An agent’s tools are told apart by name: a second one with the same
name displaces the first. When attaching two bases, give them different
tool_namevalues and different descriptions. - A name with spaces or dashes. Only letters, digits and underscores are allowed.
- Expecting the node to run by itself. Without an AI Agent it does nothing: in such a graph it is merely an unconnected setting.
Inputs
—
Outputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
tool_out | Extensionlink_extension | — |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
Knowledge Basekb_id | string | "" | Knowledge base the agent searches when it calls this tool. |
Tool Nametool_name | string | search_knowledge_base | Function name the LLM calls. Use only letters, digits, underscores. |
Tool Descriptiontool_description | string | Search the knowledge base for relevant information. | Tells the LLM when and how to use this tool. |
Top Ktop_k | integer | 5 | Maximum number of chunks a search returns. |
| Advanced | |||
Score Thresholdscore_threshold | number | 0 | Minimum similarity score a chunk must reach to be returned (0 = keep everything). |
Context Windowcontext_window | integer | 0 | Neighboring chunks to include around each result (0 = disabled). |
Metadata Filtersmetadata_filters | array | — | Hard filters over chunk metadata. Operators: = != < > <= >=. Clauses are AND-ed, and a consuming node's own filters are combined with these rather than replacing them — composing filters can only narrow the search. |