mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-06-03 12:19:45 +00:00
Enhancement: AI LLM chunk size and context window config (#12891)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user