Files & Retrieval controls upload, extraction, OCR, full-context injection, vector retrieval, semantic enhancement, RAG, and context compaction enhancement. It determines whether uploaded files can be previewed, extracted, retrieved, and used in conversation context.

Entry Point#

Open Files & retrieval in the admin console. The page is grouped into Upload limits, Extraction, Full context, Embedding retrieval, Semantic enhancement, RAG, and Context compaction enhancement.

These settings affect later file processing for all users. Before changing them, confirm storage, extraction services, Embedding service, and task models are available.

For detailed upload, extraction, full-context, vectorization, RAG, and compaction parameters, see Files & Retrieval Advanced.

Upload Limits#

Upload limits control attachments per message, default file size limit, user storage quota, MIME allowlist, and separate image or document size limits.

The MIME allowlist decides which file types users may upload. Size limits and user quota protect storage cost and processing resources. Too strict hurts upload experience; too loose increases storage and parsing pressure.

Extraction#

Extraction decides how documents, PDFs, spreadsheets, presentations, code, and text are processed. The platform can connect Tika, Docling, MinerU, Tesseract OCR, RapidOCR, PaddleOCR, Tencent Cloud OCR, Aliyun OCR, and LLM OCR.

Different services fit different file types. Tika is good for general document text extraction. OCR is useful for scans and image text. Docling or MinerU fit complex document parsing. Use connection tests to confirm service address and credentials.

Full Context#

Full context injection puts file content directly into conversation context. It fits small files, precise review, contract clause checks, and code snippet analysis.

Administrators can limit full-context text size, token budget, and PDF pages. Limits prevent large files from consuming the whole context. Disabling limits relies more on model context capacity and user judgment.

Vector Retrieval#

Vector retrieval converts file content into embeddings so the model can retrieve relevant chunks by question. It fits large files, many files, and knowledge-base style Q&A.

When configuring Embedding, enable the service and fill service address, request model, and related parameters. After changing the Embedding model, old vectors are marked stale and should be rebuilt from the index status panel.

Vector Index Status#

Vector index status shows signature, ready, stale, pending, failed, and empty states. When stale vectors are detected, use Reindex.

Reindex submits background work. With many files, it can take time. During rebuild, retrieval results for some files may be incomplete.

Semantic Enhancement and RAG#

Semantic enhancement lets the system recall more relevant history messages or file content. RAG settings control retrieved chunks, recall strategy, evidence use, and context assembly.

Message embedding must be enabled before semantic context recall. RAG is useful when there is lots of material, questions span files, or full-context injection would be too expensive.

Context Compaction Enhancement#

Context compaction enhancement helps long conversations or large-material workflows. It can compress earlier content near context limits, reduce blocking in the current reply path, and preserve key information.

The compaction model can follow the current model or use a dedicated task model. Choose a stable, cost-controlled model that summarizes well.

Practical Tips#

Configure upload limits and basic extraction first, then enable OCR, Embedding, and RAG. Use full context for small files and vector retrieval for large files. Rebuild indexes after changing the Embedding model. Before allowing a new file type, test extraction and preview with sample files.