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.

RAG ToolT

Type in the graph: rag_tool

Tool

Try it

Minimal working workflow

Entry
AI Agent
RAG ToolT
LLM
Buffer MemoryS
Exit
  • Execute + Data
  • Extension
  • LLM
  • Memory
  • Execute + Data + Streaming
Press “Copy nodes”, open the editor and hit Ctrl+V on the canvas.

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_name values 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

PortWirePayloadNotes
tool_outExtensionlink_extension

Configuration

FieldTypeDefaultDescription
Knowledge Basekb_idstring""

Knowledge base the agent searches when it calls this tool.

Tool Nametool_namestringsearch_knowledge_base

Function name the LLM calls. Use only letters, digits, underscores.

Tool Descriptiontool_descriptionstringSearch the knowledge base for relevant information.

Tells the LLM when and how to use this tool.

Top Ktop_kinteger5

Maximum number of chunks a search returns.

Advanced
Score Thresholdscore_thresholdnumber0

Minimum similarity score a chunk must reach to be returned (0 = keep everything).

Context Windowcontext_windowinteger0

Neighboring chunks to include around each result (0 = disabled).

Metadata Filtersmetadata_filtersarray

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.