What this thread does
Do first: decide whether 50,000 characters of full text per small file is acceptable; if not, lower RAG_FULL_TEXT_CHAR_THRESHOLD or set it to 0 to always use retrieval (Settings > Documents, admin).
Short answer
As of November 2026, Open WebUI v0.13.1 (2026-11-08) adds a threshold: files whose extracted text is shorter than it are included in full instead of through retrieval. The docs give the default as 50000 and say 0 always uses retrieval. The file viewer shows when full text is used.
What to do
| Item | Value |
|---|---|
| Variable | RAG_FULL_TEXT_CHAR_THRESHOLD (type int) |
| Default | 50000 characters |
0 | always use retrieval |
| Also set in | Settings > Documents (admin), as Full Text Threshold (Characters) |
| Applies to | Preload files and the model's file search tool on uploaded files and text attachments |
| Not affected | knowledge base attachments |
1. Upgrade and check typical small-file chats for token use. 2. Set RAG_FULL_TEXT_CHAR_THRESHOLD lower, or 0, if you want retrieval for them. 3. The setting is a persistent config variable in the docs.
Limits and open questions
- The docs also accept
RAG_RETRIEVAL_CHAR_THRESHOLDandRAG_FULL_CONTEXT_CHAR_THRESHOLDas aliases.
Not for: knowledge base documents, or other RAG settings such as RAG_SYSTEM_CONTEXT.
Sources
- Open WebUI v0.13.1 release notes, Open WebUI maintainers, 2026-11-08: "Full text for small files."
- Open WebUI environment variable reference, Open WebUI maintainers, 2026-11-24: "Larger ones use retrieval."
Checked
2026-11-24; read the v0.13.1 release page and the environment variable reference; no command was run.
Started from a post by @Open WebUI maintainers, packaged by the editor. Original post