Search Knowledge and Update Knowledge
Two steps for knowledge bases. Both also run on a self-hosted worker: knowledge bases live in Blokkio's database, so the worker searches and adds or deletes documents through the Blokkio API (for its own project only), and indexing happens on Blokkio's side.
Search Knowledge
Finds the passages of a knowledge base that are most similar in meaning to a question — not just matching words.
| Property | Description |
|---|---|
| Knowledge base | Pick one from the project |
| Query | What to look for, e.g. {{ $nodes.Webhook.body.question }}. Leave it empty when the step is an AI Agent tool |
| Number of passages | How many to return (default 5, at most 50) |
| Minimum relevance (0–1) | Leave out weaker matches. 0.3–0.5 suits most models; leave empty to always get the top results |
| Only documents with metadata | Key/value filters, e.g. lang = en. A document matches when it has all of them |
| Only these documents | Document IDs (yours or Blokkio's), comma-separated |
Output:
{
"query": "how long do refunds take",
"count": 2,
"passages": [
{
"citation": 1,
"text": "Refunds are paid back to the original card within five days.",
"score": 0.83,
"title": "Refunds",
"source": "https://example.com/help/refunds",
"url": "https://example.com/help/refunds",
"fileName": null,
"documentId": "4b7d…",
"documentKey": "faq-refunds",
"chunkIndex": 0,
"metadata": { "lang": "en" }
}
],
"citations": [{ "citation": 1, "title": "Refunds", "source": "https://example.com/help/refunds" }],
"context": "[1] Refunds (https://example.com/help/refunds)\nRefunds are paid back…",
"usage": { "embeddingModel": "text-embedding-3-small", "embeddingTokens": 7 }
}
context is ready to paste into a prompt. A typical answer bot: Search Knowledge → AI Text with the system
prompt Answer only from the sources below and cite them as [1], [2]. If they don't contain the answer, say so. and the
user message {{ $nodes['Search Knowledge'].context }}\n\nQuestion: {{ $nodes.Webhook.body.question }}.
As an AI Agent tool
Connect a Search Knowledge step to an AI Agent's Tools port and leave Query empty. The agent
gets a tool named after the step that takes a query (and an optional topK); it decides when to search and can cite
the numbered passages. Give the step a description (step settings) to tell the agent what the knowledge base contains,
e.g. Our refund, shipping and warranty policies.
Update Knowledge
Keeps a knowledge base in sync from a workflow — for example when a help article is published or a contract arrives by e-mail.
| Property | Description |
|---|---|
| Knowledge base | Pick one from the project |
| Action | Add or update a document, or Delete a document |
| Document ID | Your own ID, e.g. {{ $nodes.Webhook.body.articleId }}. Adding with an ID that exists replaces that document; leave empty to always add a new one. Required for delete |
| Content | Text, Web page (a URL that Blokkio fetches) or File (a file reference such as {{ $nodes['Load File'] }} — PDF, Word .docx, HTML, Markdown, CSV, JSON or text) |
| Title | Shown in search results. Defaults to the file name, page title or first line |
| Metadata | Key/value labels you can filter searches by |
| Index before continuing | On (default): the document is searchable before the next step runs. Off: it is indexed in the background |
Output: documentId, status (ready, pending or failed), chunkCount (passages), created and unchanged
(true when the content was the same as before, so nothing was re-embedded). The delete action outputs deleted.
If the document can't be read or embedded the step fails with the reason (for example No text was found in this PDF); the document stays in the knowledge base marked as failed, so you can fix it and re-index.
Embedding uses the knowledge base's own AI Provider connection and counts towards your AI token usage.