Knowledge and RAG

Knowledge bases and RAG: answers grounded in your documents

Knowledge bases hold your documents, chunked and embedded, so an agent answers from your content instead of the model's memory. Retrieval runs on Postgres with pgvector, combines keyword and vector search, and is logged in full on every run.

What is RAG for AI agents?

Retrieval-augmented generation (RAG) gives a model your documents at answer time. The question is embedded, the most relevant chunks of your content are retrieved, and they are placed in the prompt so the answer is grounded in your data. It is how an agent answers from a product manual, a policy or an internal wiki without retraining anything.

Good RAG is mostly good plumbing: sensible chunks, a retrieval strategy that catches exact terms as well as meaning, a token budget so the prompt stays bounded, and a record of what was retrieved so a wrong answer can be traced to a wrong chunk.

How do you add a knowledge base in AgentRow?

Create a knowledge base under Knowledge, add documents, then create an index. The index chunks the documents (chunk size from 200 to 8,000 characters, with overlap) and embeds each chunk with the embedding provider you choose. Re-index after editing documents.

Test retrieval before attaching anything: the retrieval test runs a query against the knowledge base and shows the matching chunks with scores, so you can tune chunk size and thresholds with real questions. Then attach the knowledge base in the agent's Knowledge tab. The default workflow already contains a knowledge retrieval node.

How does retrieval work in a run?

The knowledge retrieval node embeds the query (by default the latest user message), runs keyword and vector search, fuses the results with reciprocal rank fusion, optionally reranks them, drops results under the minimum score, and keeps the top k within the per-chunk and total token caps.

Selected chunks enter the prompt as relevant knowledge with their scores and, when enabled, citations. Every retrieval is logged with the candidates, the selected chunks, what was trimmed and why, and whether a source chunk has changed since the run.

Frequently asked questions

Which embedding models can I use?

Embeddings come from the organisation's embedding provider configurations, including managed Ollama embedding models. You pick the provider when you create an index or in the node settings.

How should I structure documents for retrieval?

Write self-contained sections with clear headings, because the heading travels with each chunk. Prefer several focused documents over one very long one when topics differ, and use the retrieval test with real user questions to adjust top k and minimum score.

What happens when nothing relevant is found?

The node's empty-result behaviour decides: continue without knowledge or stop with an explicit error. The log says the retrieval was empty either way; nothing is invented to fill the gap.

Build it in AgentRow

Join the waitlist for early access, or read how the rest of the platform fits together.