Knowledge bases
A knowledge base stores text documents together with their embeddings, so flows and agents can search them by meaning instead of exact keywords. It is what an agent searches when it looks something up, and the storage half of a RAG (retrieval-augmented generation) pipeline: ingestion writes embedded chunks into a knowledge base, and query nodes or agents pull the most similar documents back out at answer time.
Give an agent a knowledge base
Section titled “Give an agent a knowledge base”-
Create one under Knowledge bases (see Creating a knowledge base).
-
Put your documents in it. Upload them one at a time with Add document on its Documents page, keep a file store searchable in it, or build an ingestion flow for sources that change.


-
Let the agent search it: add a Knowledge row to the agent’s Toolbox and pick the knowledge base. An agent made with New agent already has a Toolbox waiting for this row. Without a Toolbox, connect a Knowledge Base Query node to the agent’s Tools handle instead.
The agent then searches the knowledge base whenever a question calls for it. For a small knowledge base, reading it whole often answers better than searching it; see How to choose between searching and reading a knowledge base.
Creating a knowledge base
Section titled “Creating a knowledge base”From Knowledge bases:
-
Click New knowledge base.
-
Fill in:
- Name — how you will pick the knowledge base in node Instructions.
- Dimensions — the length of the vectors this knowledge base stores.
Default
1536. It must match the output dimension of the embedding model you plan to use (OpenAItext-embedding-3-small= 1536). Any dimension works; the value is fixed per knowledge base, not per platform. - Distance metric — how similarity is measured: Cosine (default) or L2 (Euclidean).
- Model, under Embedding — the embedding model that writes and searches this knowledge base. It defaults to the workspace’s model; left empty, it is recorded from the first ingestion.


-
Save.
The Knowledge bases list shows each one’s dimensions, distance metric, and current document count.
Browsing documents
Section titled “Browsing documents”Click the Documents action on a knowledge base’s row to open a browser of its contents. Flows add documents, and so does Add document, which uploads a file. Each row shows:
- Title — the document’s title from its metadata, or Untitled.
- Content — the text of the chunk, searchable, with the full text in a tooltip.
- Source — where the chunk came from. A web address opens in a new tab.
- Ingested — when the document was written, newest first.
Two more columns, Source key and Raw metadata (the chunk’s metadata as compact JSON), are hidden until you turn them on, and both are searchable. Filter by Ingested to narrow the rows to a date range, or by No source key to find the chunks a re-ingest cannot replace. After a Test search, the rows are the nearest documents in order, with a Match column for how close each one is, until you select Clear search.
The table pages at 25 documents per page. Use Edit knowledge base in the header’s menu to jump back to the knowledge base’s settings.
Removing sources
Section titled “Removing sources”The Sources page lists what a knowledge base holds, one row per source key with its number of chunks, and deletes a source with all of its chunks. Documents stored without a source key share one row there.
To remove sources from a flow, for example the articles a nightly sync no longer finds upstream, use Knowledge Base Delete.
Filling a knowledge base from a flow
Section titled “Filling a knowledge base from a flow”A typical ingestion flow chains four RAG nodes:
- Read a File as Text: fetch the source text.
- Split Text: cut it into chunks.
- Embed: turn each chunk into an embedding via your chosen provider and model.
- Knowledge Base Insert: write the embedded chunks into the
knowledge base you pick in its Instructions. The node outputs
{"inserted": N, "collection_id": "..."}.


To keep the files of a file store in a knowledge base, you need no flow: set the store’s Keep searchable in and every file it writes is indexed, replaced and removed with the file. See Keep a store searchable.
Starting a flow when sources change
Section titled “Starting a flow when sources change”When Knowledge Base Sources Change starts a flow when a source is added, replaced or deleted, from the Knowledge bases screens, the AI builder or a flow. The run gets each source’s key and how many chunks it holds now. The Triggers button on the Sources page shows which flows the knowledge base starts and what its recent changes started.
Querying a knowledge base from a flow
Section titled “Querying a knowledge base from a flow”Knowledge Base Query embeds a search string and returns the nearest documents. Instructions:
- Knowledge base: the knowledge base to search.
- Search for: the text to search for. Expression-capable, so you can
pass the user’s question via
$prevor$start. - Number of results: how many of the nearest documents to return.
- Under More settings, Embedding provider and Embedding model
default to what the knowledge base was embedded with, and must match
it (default model:
text-embedding-3-small). Embedding credential is the embedding provider’s key, picked from your Secrets; leave it empty to use the knowledge base’s own.
The node outputs {"results": [{"text": "...", "metadata": {...}}, ...], "collection_id": "..."}. It also implements the tool contract, so you
can wire it to an Agent node’s TOOL handle and let the model search
the knowledge base on demand — see
Build an agent.
Typical uses
Section titled “Typical uses”- Knowledge bases for support or documentation agents, ingested once and queried on every conversation turn.
- Semantic search over product catalogues, tickets, or notes where keyword matching falls short.
- Grounding LLM answers by retrieving the top-K relevant chunks and feeding them into the prompt.