All nodes/AI/RAG
Knowledge Base
Knowledge base configuration for RAG. Selects an existing KB from the system. Connects to RAG Query or RAG Tool via a data port. Does not perform the search itself.
Type in the graph: rag_kb
Try it
Knowledge base for a RAG query
The node supplies the base and the search parameters; RAG Query uses them.
- Execute + Data
- Data
Pick your own connection or knowledge base first — the graph carries REPLACE_ME. Before running, set: an existing knowledge base.
When to use it
This node searches nothing — it declares where to search and how. Reach for it when the search parameters belong in one place: the same base is used by several nodes, or you want to change Top K and the threshold without opening each of them. If the graph performs exactly one search, pick the base directly in the Knowledge Base field of RAG Query — a separate node is not needed then.
How it works
The node has no inputs and no execution port: its value is computed when a consumer asks for it. The output goes into the KB port of RAG Query or KB Write over a plain data wire.
Five things travel through that port: the knowledge base id, Top K, the score threshold, the context window and the metadata filters. The first four override the consumer’s own fields — they turn inactive in its form. Metadata filters behave differently: they do not replace the consumer’s filters, they are AND-ed with them, so the pair “node + inline filter” can only narrow the result.
Filter values are rendered as Jinja templates, so a filter like {{ variables.sid }} is compared
against the already resolved key — the same one the write side stored.
Common mistakes
- No base selected. The Knowledge Base field is required here: a graph with an empty value fails validation before a run or a deploy.
- Expecting the node to act on its own. It never becomes a step of the run — this is configuration, not an action.
- Tuning Top K on the consumer while the base is connected. The value arrives from here; editing it on RAG Query has no effect.
- One node for two different needs. If a branch needs another threshold or another context window, add a second Knowledge Base node — the parameters reach every consumer alike.
Inputs
—
Outputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
KBoutput | Datadata | object |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
Knowledge Basekb_id | string | "" | Knowledge base every consumer of this node searches. |
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. |