ParsRAG
Persian Install

Guide

Configuration reference

Settings are environment variables in .env, and 27 of them can also be changed in the app's Settings without a restart. These are the ones you are most likely to change; defaults are the Docker values.

In the app

  • Settings changes 27 options in four groups: model (context sizes, thinking, retries, timeouts), retrieval (threshold, depths, keyword search), documents (upload limits, OCR, image previews) and indexing speed (OCR workers, CPU threads, batches).
  • Each option shows its .env value and can be reset to it, one at a time or with Reset all to .env. Values saved in the app take precedence over .env and survive restarts; they live in the app_config volume.
  • Ports, allowed addresses, Qdrant, memory limits, the largest upload request and the embedding model stay in .env and apply after a restart.
  • .env.example has only the model choice active. Every other line shows its default, grouped by whether Settings can also change it.
The Indexing speed group in Settings: Images read at the same time set to Automatic, CPU threads for embeddings changed to 8 with a Changed in the app badge, its .env value of 4 with a reset button, a Reset all to .env button, and a note that ports, allowed addresses, Qdrant, memory limits and the embedding model change only in .env
Documents & speed settings. A value changed in the app shows its .env value and can be reset to it.

Model

VariableDefaultPurposeIn the app
LLM_PROVIDERollamaollama or apiModel & connection
LLM_MODEL_NAMEqwen2.5:7b in .env.exampleModel that writes answersModel & connection
OLLAMA_DOCKER_BASE_URLhttp://host.docker.internal:11434 in .env.exampleOllama address as the app container sees it; http://ollama:11434 for Ollama in DockerModel & connection
MODEL_API_BASE_URLhttps://openrouter.ai/api/v1OpenAI-compatible endpointModel & connection
MODEL_API_KEYemptyRuntime secret, never written to diskModel & connection
MODEL_API_DISCLOSURE_ACKNOWLEDGED0Consent for an external APIModel & connection
OLLAMA_CONTEXT_LENGTH8192Context Ollama allocates per questionModel & connection
OLLAMA_THINK0Let thinking models reason before answeringModel & connection
MODEL_CONTEXT_WINDOW32768Context assumed for API modelsModel & connection
MODEL_API_MAX_RETRIES4Retries for HTTP 5xx and 429Model & connection
LLM_REQUEST_TIMEOUT_SECONDS120Per-answer timeoutModel & connection
OLLAMA_ALLOWED_HOSTSemptyExtra hosts an Ollama URL may use.env only

Search

VariableDefaultPurposeIn the app
STRICT_RAG_THRESHOLD0.75Documents only evidence gateAnswers
STRICT_RAG_TOP_KemptyFixed Documents only depth, 1–50; empty chooses per questionAnswers
HYBRID_RETRIEVE_TOP_K25Hybrid candidate poolAnswers
KEYWORD_SEARCH1BM25 fused with vector searchAnswers
EMBED_MODEL_NAMEintfloat/multilingual-e5-baseEmbedding model; changing it means uploading documents again.env only
EMBED_DEVICEautoauto, cpu, cuda or mps.env only
RERANK_MODELminiReranker_arabic_v1Hybrid reranker; none disables it.env only

Documents and OCR

VariableDefaultPurposeIn the app
PARSRAG_MAX_FILES_PER_SESSION10Files per conversationDocuments & speed
PARSRAG_MAX_FILE_BYTES104857600100 MiB per fileDocuments & speed
PARSRAG_MAX_BATCH_BYTES524288000500 MiB per uploadDocuments & speed
OCR_ENABLED1Turn OCR on or offDocuments & speed
OCR_LANGUAGESfas+engTesseract languagesDocuments & speed
OCR_DPI200Rendering resolution for scanned pagesDocuments & speed
OCR_MAX_PAGES30Scanned pages read per fileDocuments & speed
OCR_MAX_IMAGES200Images read per Word or PowerPoint fileDocuments & speed
SOURCE_IMAGE_PREVIEWS1Keep a copy of each image to show next to its sourceDocuments & speed
PARSRAG_MAX_REQUEST_BYTES534773760Largest upload request; the limits above can't exceed it.env only

Indexing speed

VariableDefaultPurposeIn the app
OCR_WORKERSemptyImages read at the same time; empty uses every CPU core, at most 8Documents & speed
PARSRAG_CPU_THREADS4CPU threads for embeddings, up to the physical coresDocuments & speed
EMBED_BATCH_SIZE8Texts per embedding pass; 32 with the GPU overlayDocuments & speed
QDRANT_UPSERT_BATCH_SIZE64Passages saved per writeDocuments & speed

Service and memory

VariableDefaultPurposeIn the app
PARSRAG_PORT8000Port on your machine.env only
PARSRAG_BIND_HOST127.0.0.1Address the port is bound to.env only
PARSRAG_ALLOWED_HOSTSemptyHost names accepted besides localhost, 127.0.0.1 and ::1.env only
PARSRAG_APP_MEMORY_LIMIT6gApp container ceiling.env only
QDRANT_MEMORY_LIMIT2gQdrant ceiling.env only
OLLAMA_MEMORY_LIMIT12gOllama container ceiling.env only

Loading…