Configure chunking, embeddings, and retrieval for optimal results
RAG (Retrieval Augmented Generation) settings control how your documents are processed and retrieved. Fine-tuning these settings can significantly improve the quality of agent responses.
When creating a knowledge base, choose a preset that matches your needs:
Preset
Best For
Trade-off
Fast
Quick setup, general content
Speed over precision
Balanced
Most use cases
Good balance of speed and quality
Quality
Complex documents, high accuracy needs
Slower processing, better results
Each preset configures the parser, chunking strategy, and chunk sizes automatically. You can customize settings after creation if needed.
Start with Balanced for most use cases. Switch to Quality if you notice retrieval issues with complex documents like PDFs with tables or multi-column layouts.
Before chunking, documents are parsed to extract text. The parser affects how well structure is preserved.
Parser
Identifier
Speed
OCR
Best For
Tika
tika
Fast
No
Plain text, simple documents
Tika + OCR
tika-ocr
Slow
Yes
Scanned documents, images with text
Unstructured
unstructured
Medium
No
Documents with headings, lists, tables
Unstructured + OCR
unstructured-ocr
Slowest
Yes
Complex scanned layouts, multi-column
The preset you choose selects an appropriate parser, but you can override it at any time in the knowledge base settings — see Configuring the Document Parser.
Tokens shared between consecutive chunks (default: 50).Overlap ensures that information at chunk boundaries isn’t lost. A sentence at the end of one chunk appears at the start of the next.
The model that converts text to vectors. Pick it carefully — it cannot be changed in place later.Consider:
Language - Some models specialize in specific languages
Domain - Specialized models for code, legal, medical, etc.
Size - Larger models are more accurate but slower
The embedding model and its dimensions are frozen at the moment a knowledge base is created. The Reindex button reapplies chunking and parsing, but it cannot swap the embedding model — the physical vector index is allocated for the original model’s dimensions and cannot be resized. To move to a different embedding model, follow the side-by-side migration in Changing the embedding model.
Higher dimensions capture more nuance but use more storage. Most models have a fixed dimension (e.g., 1536 for OpenAI embeddings). Like the model itself, dimensions are frozen at creation.
The parser can be changed after the knowledge base is created — it is no longer locked to the preset chosen at creation time.
Open the knowledge base
Go to Settings > Processing
Select the parser — use Tika + OCR (tika-ocr) for scanned documents or images that contain text
Click Save, then Reindex All
Switching the parser only affects new documents until you click Reindex All to reprocess existing ones. OCR parsers (tika-ocr, unstructured-ocr) extract text from scans and images but are noticeably slower to index.
For files uploaded directly into an agent’s chat, the parser lives on the agent’s conversation store rather than a regular knowledge base. See Enabling OCR for chat-uploaded files.