Skip to main content
Admin › Settings › Documents
The document processing quality of Knowledge Bases (KBSphere) is determined by these settings.
  • Properly configuring content extraction engines, text splitting, and embedding models is essential for RAG search accuracy.
Documents settings tab

Manage all RAG pipeline settings in Admin > Settings > Documents


Extraction Engine

In the Extraction Engine section at the top of the page, register and manage the engine instances used to extract document text.
  • Extraction is not “picking a single engine globally” — instead, you register named instances and select them per extension within a profile.
1

Register an engine instance

Add an instance with the + button in the Extraction Engine section, then specify a name and engine type (Default, LLM Vision, Document Intelligence, etc. — see Content Extraction for type descriptions). You can register multiple instances of the same type with different settings.
2

Set as Primary

Designate an instance as Primary. When a profile doesn’t map a specific extension to an individual instance, the Primary instance is used as the default extractor.
Registered instances are shown as Name - Primary (e.g., Default - Primary, LLM Semantic - Primary) and referenced by this name in a profile’s extension mapping.

Document Processing Profiles

New feature — Bundle document extraction methods and chunking strategies into profiles. Create multiple profiles and select per Knowledge Base (KB).

What is a Profile?

Previously, only one global extraction/chunking setting was possible. With profiles, define different setting bundles per use case and pick the appropriate profile for each KB. Each profile consists of an extraction engine mapping per file extension (e.g., .pdf → Default - Primary) and chunking settings.

Profile Management

In the Document Processing Profiles section at the top of the Documents settings page, create and manage profiles.
1

Create profile

Click + New Profile to open the profile creation modal.
2

Set default profile

Click Set as Default in the profile list to sync that profile’s settings as the global default. KBs without a specified profile are processed with this default.
3

Pick profile in KB

In Workspace > Knowledge Base edit screen, pick the document processing profile. If unset, the default profile applies.
The default profile can’t be deleted. Set another profile as default before deleting.

Content Extraction

These are the engine types you can create as Extraction Engine instances.
  • Register each type as an instance, then map it per extension in a profile.
The default engine is sufficient for most text-based documents (PDF, DOCX, TXT). For mostly scanned documents or image-heavy PDFs, Document Intelligence or Mistral OCR is recommended.

LLM Vision Extraction

New feature — A method that sends page images directly to a Vision-capable LLM (GPT-4o, Claude, etc.) for extraction as markdown text.
Compared to traditional OCR engines, this provides higher accuracy for complex layouts, text within images, and chart descriptions. Behavior:
  1. Convert PDF to per-page images (300DPI-class)
  2. Send each page image to Vision LLM in parallel
  3. LLM returns markdown preserving table/list/title structure
  4. Auto-correct broken sentences at adjacent page boundaries
LLM Vision incurs page count × LLM calls. A 10-page PDF → ~19 calls (10 extractions + 9 boundary corrections). Consider processing time and cost for large documents.
LLM Vision requires the PyMuPDF package. Without it, document uploads using this engine will fail. Verify PyMuPDF installation in the deployment environment.

Text Splitting

Configure how extracted text is split into search-friendly chunks.
When sentences are cut at chunk boundaries, related content may be missed during search. Overlap shares some text between adjacent chunks to preserve context. The default 100 is appropriate in most cases.
Enabling Bypass Embedding and Retrieval skips text splitting and embedding, injecting the entire document directly into the LLM context. Use only for small documents — large documents may exceed token limits.

Semantic Chunking

New feature — A method that splits chunks based on inter-sentence meaning similarity instead of fixed size.
When Text Splitter is set to Semantic, sentences are converted to embedding vectors, and chunk boundaries are auto-determined where similarity between adjacent sentences drops sharply.
Semantic chunking requires an embedding engine to be configured. Without one, picking Semantic causes errors.

Table Preservation

New feature — Preserve tables (HTML/markdown format) in documents intact instead of splitting.
Standard chunking can split tables across multiple chunks, losing row/column information. With Table Preservation enabled:
  1. Auto-detect tables in the document (HTML <table>, markdown |...|)
  2. Standard chunking on text portions only
  3. Tables are attached intact to the closest text chunk
  4. Tables exceeding chunk size are split row-by-row while preserving the header
Controlled by the Preserve Tables option in profile advanced settings (default: enabled).
Especially effective for table-heavy financial reports and technical specifications. Search accuracy for specific cell values within tables is greatly improved.

Contextual Chunking

New feature — Each chunk has a context summary of the entire document generated by the LLM and prepended. Implements Anthropic’s Contextual Retrieval technique.
In later chunks of long documents, earlier context is lost, causing search matching failures. With contextual preservation enabled:
  1. After chunking completes, call LLM for each chunk
  2. Generate a summary of “where this chunk is in the entire document and its context”
  3. Prepend the summary to the chunk before vectorization
LLM calls happen per chunk count. A document with 100 chunks → 100 LLM calls. Bulk uploading large documents can greatly increase API costs. Use selectively for small or important documents.

Embedding Settings

Configure the embedding engine and model that converts documents to vectors.
Changing the embedding model makes existing document vectors incompatible. After changing the model, all Knowledge Bases must be reindexed.
Supported Engines:
Open-source embedding engine running locally.

File Upload Limits


Question Generation

A feature that pre-generates “questions a user might ask” for each chunk via LLM to improve search accuracy.
Enabling adds LLM calls during document processing. Increases processing time and cost — use only when search accuracy is insufficient.

Cloud Storage Integration

Import documents into Knowledge Bases from external cloud storage.
  • This setting only provides toggles — actual auth info must be set via environment variables.
Environment variables must be set to enable toggles. Enabling a toggle shows the cloud source in the Knowledge Base’s Add Content menu.

Reindexing and Reset

The actions below are irreversible. Always confirm before executing.

When Reindexing is Needed

  • When you’ve changed the embedding model
  • When you’ve changed the search engine (Vector DB)
  • When you’ve changed chunk size/overlap
  • When document processing has issues

Knowledge Base

Create Knowledge Bases and manage documents — pick profile per KB

Search Engine

Vector DB and search parameter settings

Dynamic Filters

Knowledge Base metadata filter settings