2 AI Model Recommendations
shamoon edited this page 2026-08-09 16:25:14 -07:00

AI Model Recommendations

Paperless-ngx uses two separate types of model when its optional AI features are enabled:

  • A generation model creates suggestions and answers questions in document chat. Configure it with PAPERLESS_AI_LLM_MODEL.
  • An embedding model powers similar-document search and retrieval-augmented generation (RAG). Configure it with PAPERLESS_AI_LLM_EMBEDDING_MODEL.

The best choice depends on your archive's language, available hardware, privacy requirements, and tolerance for slower responses. Treat the models below as starting points, not benchmarks or endorsements.

Generation models

Remote models require no local GPU, but document content is sent to the provider and usage may cost money. Local models keep content on your network but must fit your hardware and can be slower.

For suggestions, prefer an instruction/chat model that follows structured output reliably. Start with a model that comfortably fits your hardware and test both suggestions and document chat on representative documents.

Embedding models

The default Hugging Face model, sentence-transformers/all-MiniLM-L6-v2, is a small, fast choice for primarily English archives. For primarily non-English or multilingual archives, consider a multilingual model such as:

  • intfloat/multilingual-e5-small
  • intfloat/multilingual-e5-base
  • BAAI/bge-m3

Larger embedding models may improve retrieval, but use more memory and take longer to build the index. Start with the smallest model that covers your languages.

Changing the embedding model requires rebuilding the LLM index. See Managing the LLM index.

Practical selection guide

  1. Decide whether document content may leave your network. If not, use Ollama, local Hugging Face embeddings, or another self-hosted OpenAI-compatible server.
  2. Start with a small generation model. Move to a larger model only if quality is insufficient and your hardware has capacity.
  3. Choose an embedding model for the languages in your archive. Generation and embedding models do not need to come from the same family.
  4. If requests time out, try a smaller generation model before increasing PAPERLESS_AI_LLM_REQUEST_TIMEOUT. RAG-backed suggestions include context from similar documents and may take substantially longer.
  5. Set PAPERLESS_AI_LLM_OUTPUT_LANGUAGE if responses should use a particular language.

For all available settings, see the AI configuration documentation.