ScriptsMar 31, 2026·2 min read

Kotaemon — Open-Source RAG Document Chat

Clean, open-source RAG tool for chatting with your documents. Supports PDF, DOCX, web pages. Multi-model, citation, and multi-user. Self-hostable. 25K+ stars.

TL;DR
Kotaemon is a self-hostable, open-source RAG application for chatting with PDF, DOCX, and web documents with citations and multi-model support.
§01

What it is

Kotaemon is an open-source RAG (retrieval-augmented generation) tool that lets you chat with your documents. Upload PDFs, DOCX files, or web pages, and ask questions in natural language. Kotaemon retrieves relevant passages and generates answers with citations pointing back to the source documents. It supports multiple LLM providers and can be self-hosted.

It targets researchers, analysts, and knowledge workers who need to extract information from large document collections without reading everything manually.

§02

How it saves time or tokens

Kotaemon handles the full RAG pipeline internally: document parsing, chunking, embedding, vector storage, retrieval, and answer generation with citations. Instead of building this stack from individual components, you run a single application. The citation feature is particularly valuable -- you can verify every answer against the source document.

§03

How to use

  1. Install and run:
pip install kotaemon
python -m kotaemon

Or with Docker:

docker run -p 7860:7860 ghcr.io/cinnamon/kotaemon:latest
  1. Open http://localhost:7860.
  2. Configure your LLM provider (OpenAI, Anthropic, Ollama) in Settings.
  3. Upload documents and start asking questions.
§04

Example

User: What are the main risks identified in the annual report?

Kotaemon: The report identifies three main risks:
1. Currency fluctuation exposure in Asian markets [page 12]
2. Supply chain disruption from single-source dependencies [page 15]
3. Regulatory changes in data privacy requirements [page 23]

[Click citations to view source passages]

Each answer includes clickable citations that link to the exact source passages.

§05

Related on TokRepo

§06

Common pitfalls

  • Document parsing quality varies by file type. PDFs with complex layouts (multi-column, tables, scanned images) may not parse correctly. Pre-process problematic PDFs with an OCR tool for better results.
  • Embedding model choice affects retrieval quality. The default embedding model works for general text. For specialized domains (legal, medical), consider a domain-specific embedding model.
  • Large document collections increase storage and retrieval latency. For hundreds of documents, ensure adequate disk space and consider using a more performant vector store backend.

Frequently Asked Questions

What document formats does Kotaemon support?+

Kotaemon supports PDF, DOCX, TXT, Markdown, and web pages (via URL). PDFs are the primary use case and receive the most parsing attention. For other formats, documents are converted to text before processing. Complex formatting in DOCX files is simplified during ingestion.

Can I use Kotaemon with local models?+

Yes. Kotaemon supports Ollama and other local LLM providers. Both the chat model and the embedding model can run locally, ensuring no data leaves your machine. This is ideal for sensitive documents. Quality depends on the local model's capability.

How do citations work?+

When Kotaemon generates an answer, it includes references to the specific document passages it used. Each citation links to the source document and highlights the relevant passage. This lets you verify the answer's accuracy and read the original context. Citations are a core feature, not an add-on.

Is Kotaemon suitable for teams?+

Yes. Kotaemon supports multi-user access with separate accounts and document collections. Each user can upload their own documents and maintain private conversations. An admin can manage users and configure global settings. For team deployments, use the Docker version with persistent storage.

How does Kotaemon compare to AnythingLLM?+

Both are RAG applications for document chat. Kotaemon focuses on clean document understanding with strong citation support. AnythingLLM is broader, including agents and a plugin system. Kotaemon has a more polished document experience with better PDF handling. AnythingLLM offers more flexibility with its agent and workspace features.

Citations (3)
🙏

Source & Thanks

Created by Cinnamon. Licensed under Apache 2.0. Cinnamon/kotaemon — 25,000+ GitHub stars

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets