Enhancement: AI LLM chunk size and context window config (#12891)

This commit is contained in:
shamoon
2026-06-01 10:56:21 -07:00
committed by GitHub
parent bb860a5834
commit f6c865bf47
15 changed files with 318 additions and 36 deletions
+16
View File
@@ -2052,6 +2052,22 @@ models supported by the current embedding backend. If not supplied, defaults to
Defaults to None.
#### [`PAPERLESS_AI_LLM_EMBEDDING_CHUNK_SIZE=<int>`](#PAPERLESS_AI_LLM_EMBEDDING_CHUNK_SIZE) {#PAPERLESS_AI_LLM_EMBEDDING_CHUNK_SIZE}
: The chunk size to use when splitting document text for RAG embeddings. Lower this value if your
embedding backend or model rejects larger inputs, or silently truncates inputs in a way that harms
retrieval quality.
Defaults to 1024.
#### [`PAPERLESS_AI_LLM_CONTEXT_SIZE=<int>`](#PAPERLESS_AI_LLM_CONTEXT_SIZE) {#PAPERLESS_AI_LLM_CONTEXT_SIZE}
: The context size to use for AI prompts and RAG retrieval. For Ollama backends, this is also sent
as `num_ctx` so models with very large native context windows are not loaded at their maximum
context by default.
Defaults to 8192.
#### [`PAPERLESS_AI_LLM_BACKEND=<str>`](#PAPERLESS_AI_LLM_BACKEND) {#PAPERLESS_AI_LLM_BACKEND}
: The AI backend to use. This can be either "openai-like" or "ollama". If set to "ollama", the AI