Kotaemon: Open-source GraphRAG UI On Local Machine
Kotaemon is an open-source, clean, and customizable Retrieval-Augmented Generation (RAG) User Interface (UI) designed for both end-users and developers. Whether you’re a user seeking to perform Question Answering (QA) on your documents or a developer looking to build your own RAG pipeline, Kotaemon provides the tools you need.
In this article, we’ll explore Kotaemon’s features, its architecture, and how you can get started with this versatile platform.
Preview
Before diving into the details, check out the Live Demo and the Source Code. If you’re ready to get hands-on, the User Guide and Developer Guide are available to help you get started.
Key Features
Kotaemon offers a wide range of features tailored to different user needs:
For End Users:
- Clean & Minimalistic UI: A user-friendly interface for RAG-based QA.
- Support for LLM API Providers: Seamless integration with OpenAI, AzureOpenAI, Cohere, and local models via Ollama and llama-cpp-python.
- Easy Installation: Quick setup scripts to get started immediately.
For Developers:
- Customizable RAG Pipeline: A framework to build and customize your RAG-based document QA pipeline.
- Interactive UI: Built with Gradio, developers can see their RAG pipeline in action and make adjustments as needed.
General Features:
- Host Your Document QA Web-UI: Support for multi-user login, file organization in private/public collections, and collaboration features.
- Hybrid RAG Pipeline: Combines full-text and vector retrievers with re-ranking for optimal retrieval quality.
- Multi-Modal QA Support: Handle QA on multiple documents, including those with figures and tables.
- Advanced Citations with Document Preview: Detailed citations to ensure LLM answer accuracy, with an in-browser PDF viewer for verification.
- Support for Complex Reasoning Methods: Question decomposition, agent-based reasoning, and more.
- Configurable Settings UI: Easily adjust retrieval and generation settings via the UI.
- Extensible: Built on Gradio, allowing for UI customization and support for various document indexing and retrieval strategies, including a GraphRAG indexing pipeline.
Installation
Kotaemon can be set up using Docker or directly on your machine. Below are the steps for both methods:
With Docker (Recommended)
To launch the server with Docker, use the following command:
docker run \
-e GRADIO_SERVER_NAME=0.0.0.0 \
-e GRADIO_SERVER_PORT=7860 \
-p 7860:7860 -it --rm \
taprosoft/kotaemon:v1.0
Navigate to
http://localhost:7860/
to access the web UI.
Without Docker
If you prefer to install without Docker, follow these steps:
- Setup Environment (Optional):
conda create -n ragui python=3.11
conda activate ragui
Notes: if you use bash terminal then type this command
source activate ragui
- Clone the Repository:
git clone https://github.com/Cinnamon/kotaemon
cd kotaemon
- Install Required Packages:
pip install -e "libs/kotaemon[all]"
pip install -e "libs/ktem"
- Configure Environment Variables:
- Edit your
.env
file to include API keys and endpoints. - Start the Web Server:
python app.py
- The app will automatically launch in your browser.
- Default Username/Password:
admin/admin
. Additional users can be set up directly through the UI.
Conclusion
Kotaemon is a powerful tool for anyone looking to leverage RAG for document-based QA. Whether you’re an end-user needing a simple UI or a developer aiming to build complex RAG pipelines, Kotaemon offers the flexibility and features you need.
Explore the Live Demo, dive into the Source Code, and start building your RAG-based solutions today!