Local Knowledge Base (RAG)

Loading, searching and limits of the documents consulted by the model.

1. What RAG does

RAG searches documents and supplies retrieved passages to the model. ZeroChat extracts and splits content in the browser, stores it in IndexedDB and builds text indexes with Orama. Search is lexical: it does not generate embeddings or use a vector index.

Loading and indexing do not require an AI service. When answering, retrieved passages and images become part of the conversation and are sent to the selected provider. Local storage does not make a query to a remote provider private.

2. Knowledge branches

A branch groups documents for a topic or project. These document collections are separate from conversation branches.

  1. Open Settings → RAG → Branches to create a branch, choose its language and manage its documents.
  2. Load files and wait for processing to finish.
  3. Enable the branches you want to consult from Settings → RAG → Activate or with the RAG button in the composer.

You can enable several. A warning appears if their languages differ; selections remain unchanged. Only active branches are available to retrieval tools.

3. Loading and processing documents

Drag files into the RAG panel or select them from its upload area. Text is split into chunks so parts of a document can be searched and read.

4. Search and retrieval tools

The model must support tool calls and have access to the RAG tools. Enabling a branch does not send all its documents or guarantee the model will consult them.

Name the document or topic and ask for sources. If results are missing, try terms that appear in the text; lexical search may miss synonyms or translations.

5. Settings and limits

Storage

Documents and chunks are kept in IndexedDB; Orama indexes are built in memory. Usable volume depends on browser memory and storage quota. Clearing site data deletes the document collection.

File access

Selecting files allows that upload to be read, without granting general disk access. Keep the originals: exporting a conversation does not back up RAG branches.

Answer quality

A low temperature can reduce variation but does not guarantee accuracy. Check figures and quotations against the original, especially for PDFs with tables or scans.

RAG was tuned against FinanceBench until a local model such as Qwen solved the first two and the last two tests. This does not guarantee that a small model will solve every question in the bench.

Checkpoints

RAG needs a model with at least 32K tokens of context. Below that, the retrieval protocol, tools, and a few chunks fill the window and the conversation is compacted almost immediately. When the model limit is known and falls short, ZeroChat warns you on branch activation; the notice does not prevent use.