Yearly Pay yearly and get 2 months free on every paid plan. See plans
Sign in Start free

Knowledge Bases & RAG

Last updated 15 Jun 2026

Overview

A knowledge base lets you give the AI your own documents to ground its answers. ToRun ingests documents, splits them into chunks, indexes them, and at query time retrieves the most relevant chunks using a hybrid of vector (semantic) and lexical (keyword) search — this is Retrieval-Augmented Generation (RAG).

How it's structured

  • Knowledge base — the container you create and own.
  • Knowledge document — each file or source you add to a base.
  • Knowledge chunk — the indexed pieces a document is split into; retrieval happens at the chunk level.

Knowledge bases are user-scoped — your base and its contents belong to you.

Creating and populating a base

  1. Create a knowledge base and give it a clear name.
  2. Add documents. ToRun ingests each document, splits it into chunks, and builds embeddings for semantic search.
  3. Once indexed, the base is available to ground answers.

How retrieval works

When you ask a question against a base, ToRun runs:

  1. Vector search — embeds your query and finds semantically similar chunks.
  2. Lexical search — matches keywords directly, catching exact terms vector search can miss.
  3. The combined top results are passed to the model as grounding context, and the answer is generated from them.

This hybrid approach catches both "means the same thing" and "contains this exact term" matches.

Cost

Embedding documents during ingestion and answering grounded questions are AI calls, so each produces a BillingRecord with a pricing snapshot. Ingestion cost is roughly proportional to document volume; query cost is per question.

Tips

  • Add clean, well-structured documents — garbled text indexes poorly and retrieves poorly.
  • Keep a base focused on one topic or project; a single giant mixed base retrieves noisier results.
  • For support-style deflection (answering questions from a help corpus), a knowledge base is what grounds the assistant's answers, so the answers stay accurate to your content.
  • Re-add or refresh documents when the underlying material changes — retrieval only knows what's indexed.
Stuck? The forum usually answers within hours; support within 24 hours. Ask the forum Contact support