preloader
post-thumb

Last Update: March 14, 2025 10 min read


BYauthor-thumberic

|Loading...

I Tried 9 Open-Source RAG Tools on My Own Documents: What Worked

Retrieval-augmented generation (RAG) means the model looks things up in your documents before it answers, instead of relying only on what it learned in training. Every chat UI now claims to do it. In March 2025 I wanted to know which self-hosted tools actually do it well, so I installed nine of them, loaded my own PDFs, and asked questions I could check.

Mostly I used the same small set of documents: six PDFs about options trading (webinar notes, a strategies quick guide, an "understanding options" booklet and similar). I also tried a forex beginners' guide, an Australian BAS and super due-date sheet, a health booklet and a couple of books. Every screenshot below is from my own install.

The short version

Tool
Setup effort
Did retrieval work?
Verdict
Open WebUI
Easy (pip)
Yes, with citations
Best if you already use it for chat
RAGFlow
Medium (Docker)
Yes, precise answers with sources
Best dedicated RAG tool I tried
Onyx
Hard (Docker, auth)
Yes, when it chose to search
Best for teams and many data sources
MaxKB
Medium (Docker)
Partly; miscounted names
Nice UI, check its answers
Verba
Easy (Docker)
Yes, but one document set only
Good for a single knowledge base
Kotaemon
Hard to configure
Yes, after tweaking
Powerful, not friendly
RAG Web UI
Easy (Docker, OpenAI key)
Yes
Simple, but rigid knowledge bases
LobeChat
Easy (Docker)
No: OpenAI key error with Ollama
Great chat UI, RAG didn't work for me
Cognita
Hard
Never got that far
Not out of the box

If you want one answer: Open WebUI if you just want to add documents to the chat UI you already use, RAGFlow if you want a proper RAG system, Onyx if your documents live in Google Drive, Confluence and the like and a team needs to search them.

Open WebUI

Open WebUI is mainly a chat UI for local and cloud models (I covered it in my chat UI comparison), but its Knowledge feature is a capable RAG system.

bash
# ideally inside a fresh virtual environment
pip install open-webui
open-webui serve
# http://localhost:8080

I created two knowledge collections, Forex Trading For Beginners and a testkb:

Open WebUI Workspace > Knowledge with two collections

Then I created a custom model on top of a base model and attached the forex collection to it:

Creating a custom model in Open WebUI with a knowledge collection attached

I asked my "ForexTrading" model a beginner question: "what is the best timeframe I should use a beginner". It thought for 20 seconds, recommended starting on the 4-hour chart, and cited the PDF it took that from (Forex-Trading-For-Beginners-The-Ultimate-Guide.pdf):

Open WebUI answering from the forex PDF, with a citation

You can also pull a collection into any chat by typing # in the prompt box. The RAG docs explain the embedding and chunking settings.

Verdict: the least effort for a useful result. If you already chat through Open WebUI, start here before installing anything else.

RAGFlow

RAGFlow focuses on "deep document understanding": it parses layouts, tables and images instead of blindly chunking text.

bash
git clone https://github.com/infiniflow/ragflow.git
cd ragflow/docker
docker compose up -d
# http://localhost

I made two knowledge bases, a one-document testrag and a 15-document testkb:

RAGFlow knowledge bases: testrag (1 doc) and testkb (15 docs)

Each chat assistant is tied to knowledge bases, and you can switch on quoting, keyword analysis and web search (Tavily):

RAGFlow chat assistant configuration

The best result came from a set of Australian payroll and tax reference sheets, which were images, not text. I asked when BAS is due, and then "when are the super due dates". RAGFlow answered both correctly (BAS: 25 Nov, 28 Feb, 25 May, 25 Aug; super: 28 Oct, 28 Jan, 28 Apr, 28 Jul) and cited the exact image each answer came from (4. BAS Agent Due Dates.png, 5. Super FAQ.png). Reading dates out of images is exactly where simpler tools fall down.

RAGFlow answering BAS and super due dates from image documents

It also has an agent builder with templates (web search assistant, text-to-SQL and others):

RAGFlow agent templates

Verdict: the most accurate answers I got, and the best handling of messy documents. It's a heavier Docker stack, so give it a machine with plenty of RAM.

Onyx (formerly Danswer)

Onyx is built for teams: 40+ connectors (Google Drive, Confluence, SharePoint, GitHub, email…), access control and custom assistants.

bash
git clone https://github.com/onyx-dot-app/onyx.git
cd onyx/deployment/docker_compose
cp env.prod.template .env
# Onyx expects Google OAuth by default. For a local trial set:
#   AUTH_TYPE=basic   (or disabled)
cp env.nginx.template .env.nginx
ln -s docker-compose.prod.yml docker-compose.yml
docker compose up -d
# http://localhost

Document processing can optionally go through the Unstructured API; I left it on the built-in parser:

Onyx document processing settings

I used the File connector to upload my six options-trading PDFs as Options Trading PDFs:

Onyx file connector with six options trading PDFs

Then I made an Options Trader assistant ("You are a professional options trader…") linked to a document set:

Onyx Options Trader assistant configuration

Two things happened that are worth knowing about. First, when I asked "are options a wasting asset?", Onyx decided "The AI decided this query didn't need a search" and answered from the model's own knowledge. The answer about time decay was fine, but it didn't come from my documents. There's a Force search button for exactly this case.

Onyx skipping retrieval: "The AI decided this query didn't need a search"

Second, when it did search, it worked. Asked "is there any options trading game available, and what is the website?" (with GPT-4o as the model), it searched, found the ASX options game in one of my PDFs and showed the sources. The cited snippet says "Sign up to play at optionsgame.com.au", though the answer itself pointed to asx.com.au, so check the source rather than the summary.

Onyx answering with sources from the uploaded PDFs

Verdict: the most complete platform here, and the obvious choice if your knowledge lives in SaaS tools. It's also the heaviest to set up, and you need to watch whether it actually searched.

MaxKB

MaxKB is a ready-made knowledge-base chatbot with a workflow engine, and it works with many models (OpenAI, Claude, DeepSeek, Qwen, Llama…).

bash
mkdir MaxKB && cd MaxKB
cat > docker-compose.yml <<'EOF'
services:
  maxkb:
    image: 1panel/maxkb
    container_name: maxkb
    ports:
      - "8080:8080"
    volumes:
      - ~/.maxkb:/var/lib/postgresql/data
      - ~/.python-packages:/opt/maxkb/app/sandbox/python-packages
    restart: unless-stopped
EOF
docker compose up -d
# http://localhost:8080  (default login: admin / MaxKB@123..)

Setting up models was the fiddly part. You add each provider and model by hand:

MaxKB adding an OpenAI model

After that it's pleasant. It even generates likely questions from your documents automatically:

MaxKB auto-generated questions for a knowledge base

But look closely at this answer. I loaded a book about investors and short sellers and asked "how many people's names showed in the book". It said 15 individuals, then listed nine. When I pointed out it had missed some ("like Dalio"), it produced a different list and said the text doesn't mention Ray Dalio.

MaxKB answer claiming 15 names but listing 9

That's a RAG limitation, not just a MaxKB one: the model only sees the few chunks that were retrieved, so "how many…" and "list all…" questions over a whole book are exactly what RAG is bad at.

Verdict: a good-looking, capable tool once the models are configured. Don't trust counting or "list everything" answers from any RAG system.

Verba

Verba, from the Weaviate team, is the simplest dedicated RAG app here.

bash
git clone https://github.com/weaviate/Verba.git
cd Verba
docker compose up -d --build
# http://localhost:8000

Importing my six options PDFs was quick: split into 25 chunks and vectorized in about 3 seconds.

Verba importing six options trading PDFs

I asked it to "help me find the best option trading strategy". It sensibly said the documents didn't support recommending a single "best" strategy, then summarized what they did say (mostly about Bollinger Bands), with sources:

Verba answering from the options PDFs with sources

Refusing to make up a "best strategy" is good RAG behaviour. The limitation is that Verba has a single document pool ("Chatting with 6 documents"). You can't keep separate knowledge bases per client or project and switch between them.

Verdict: great for one focused knowledge base. Not for multiple.

Kotaemon

Kotaemon is a clean Gradio app with hybrid search, in-document citation highlighting, and GraphRAG and LightRAG collections alongside normal file collections.

bash
mkdir kotaemon && cd kotaemon
git clone https://github.com/Cinnamon/kotaemon.git code
mkdir docker-compose && cp code/.env.example docker-compose/.env
cd docker-compose
cat > docker-compose.yml <<'EOF'
services:
  kotaemon:
    image: ghcr.io/cinnamon/kotaemon:main-lite
    environment:
      - GRADIO_SERVER_NAME=0.0.0.0
      - GRADIO_SERVER_PORT=7860
    ports:
      - "7860:7860"
    volumes:
      - ./ktem_app_data:/app/ktem_app_data
    stdin_open: true
    tty: true
    restart: unless-stopped
EOF
docker compose up -d
# http://localhost:7860  (login admin / admin)

It accepts a wide range of files (PDF, Office, images, HTML, CSV, Markdown, zip):

Kotaemon file collection with a PDF loaded

It didn't work at first. You don't pick a model in the chat; you set a default model under Resources, which took me a while to find. Once configured, it did well. I gave it a Spanish textbook, and it produced a step-by-step study plan from the lessons, with a mind map and the source page highlighted:

Kotaemon answering from a Spanish textbook with a mind map and page citation

Verdict: the nicest citation display of the lot, but the least intuitive configuration.

RAG Web UI

A straightforward full-stack RAG app: knowledge bases, document upload (PDF, DOCX, Markdown, text) and chat.

bash
git clone https://github.com/rag-web-ui/rag-web-ui.git
cd rag-web-ui
cp .env.example .env    # set OPENAI_API_KEY
docker compose up -d --build
# http://localhost

RAG Web UI dashboard

I uploaded a health information booklet and asked what it was about, then for more detail. Both answers were accurate summaries with citations:

RAG Web UI answering questions about an uploaded booklet

The rough edges are in management. You can't rename a knowledge base after creating it, and you can't change which knowledge base a chat uses; to switch, you start again.

Verdict: fine for a quick single-purpose setup, if you're happy using OpenAI.

LobeChat

LobeChat is one of the best-looking chat UIs (see my chat UI comparison), and it has a knowledge base feature that handles text, images, audio and video files.

bash
mkdir lobe-chat-db && cd lobe-chat-db
bash <(curl -fsSL https://lobe.li/setup.sh) -l en
docker compose up -d
# http://localhost:3210

LobeChat running locally

I couldn't get its RAG working. With a knowledge base attached and a local Ollama model selected, the chat failed with an OpenAI API key error in the background. My guess is that the embedding step still defaults to OpenAI even when the chat model is local, so check the embedding model settings if you try it.

Verdict: use it as a chat UI. For RAG, I'd pick something else.

Cognita

Cognita, from TrueFoundry, is a modular RAG framework meant for building production systems, with a UI on top.

bash
git clone https://github.com/truefoundry/cognita.git
cd cognita
cp models_config.sample.yaml models_config.yaml
docker compose --env-file compose.env up -d
# http://localhost:5001

Cognita DocsQA start screen

I never got past creating a collection: the embedding model dropdown stayed empty. Cognita takes its models from models_config.yaml, and mine evidently wasn't set up with a working embedding model.

Cognita new collection form with an empty embedding model list

Verdict: a framework for developers, not a tool you install and use. Budget time for configuration.

What I learned

  1. Check the citations, not just the answer. Onyx answered without searching once, and cited the right snippet with the wrong website another time. Every tool that shows its sources makes that checkable. Use one that does.
  2. RAG can't count. Questions like "how many names are in the book" need the whole document, and RAG only retrieves a few chunks. MaxKB's 15-names-but-lists-9 answer is the typical failure.
  3. Document parsing matters more than the chat UI. RAGFlow's correct answers from images of tax tables were the most impressive thing I saw. If your documents are scans, tables or slides, pick the tool by its parser.
  4. The embedding model is the hidden dependency. LobeChat's OpenAI error and Cognita's empty dropdown were both about embeddings. If you want everything local, make sure the embedding model is local too, not just the chat model.
  5. Start with what you have. If you already run Open WebUI, its Knowledge feature may be all you need.

If you need a private knowledge base for a small business and want help choosing or hosting one, get in touch with TYO Lab.

Comments (0)

Leave a Comment
Your email won't be published. We'll only use it to notify you of replies to your comment.
Loading comments...
Previous Article
post-thumb

Mar 27, 2025

tyo-crawler: Crawl, Clone and Log In to Websites with Puppeteer and Redis

How to install and use tyo-crawler, my Node.js crawler built on Puppeteer with a Redis link queue: the three crawl modes, what each option really does, writing actions.json for logins, resetting a crawl, and the current gotchas.

Next Article
post-thumb

Mar 06, 2025

Budget 256GB–512GB RAM AI Workstation: Used EPYC 7002/7003 vs Xeon W3-2400

Two cheap ways to build a workstation with 256GB to 1TB of RAM for local AI: a used AMD EPYC 7002/7003 server platform or a new Intel Xeon W3 on W790. Parts, March 2025 prices, memory bandwidth and the gotchas.

agico

We transform visions into reality. We specializes in crafting digital experiences that captivate, engage, and innovate. With a fusion of creativity and expertise, we bring your ideas to life, one pixel at a time. Let's build the future together.

Copyright ©  2026  TYO Lab · v0.0.39