Query
Query vectors in a knowledge base by id, text, or vector.
Type
kb.queryFolder
kbChannels
Any
Pipe
Value
Scope
Any
Query (canvas label KB Query) searches a knowledge base. By text matches similar meaning (not exact keywords). By ID loads one vector. By vector searches with an embedding you already have.
For By text and By vector, set Top K and optional metadata filters. Filters follow the store’s meta fields when Strict is on.
Configure
| Setting | Description |
|---|---|
| Knowledge base | Store to search (required) |
| Query mode | By ID, By text (default), or By vector |
| Vector ID | Shown in By ID — id of the vector |
| Text | Shown in By text — search phrase |
| Vector (comma-separated) | Shown in By vector — embedding values |
| Top K | Shown in By text / By vector — how many hits to return. Default 10, 1–1000 |
| Metadata filter | Shown in By text / By vector — optional conditions on metadata |
Handles
| Handle | Role |
|---|---|
| In (target) | Incoming connection |
| Out (source) | Continues after the search returns |
Pipe schema
The next block reads this on the data pipe (pipe.value).
By ID — one result, or null if missing:
| Key | Type | Description |
|---|---|---|
id | text | Vector id |
metadata | object | Metadata (strict fields, or loose plus source, sourceId, sourceType, text) |
values | list of numbers | Embedding values |
By text / By vector — an object:
| Key | Type | Description |
|---|---|---|
results | list | Hits, best match first |
Each hit includes:
| Key | Type | Description |
|---|---|---|
id | text | Vector id |
pageContent | text | Indexed text |
score | number | Similarity score |
metadata | object | Metadata for that chunk |