RAGFlow: Retrieval Built Around Document Understanding

RAGFlow: Retrieval Built Around Document Understanding

RAGFlow is a retrieval-augmented generation engine whose distinguishing argument is that most RAG systems fail at the first step: getting text out of documents properly.

Why extraction quality dominates

The usual RAG pipeline treats a document as a stream of text, splits it every thousand characters, and embeds the pieces.

That works for prose and falls apart on real documents. A table split across two chunks becomes meaningless. A heading separated from its section loses its context. A multi-column PDF read as a single stream interleaves two unrelated columns into nonsense. A scanned page without OCR contributes nothing at all.

None of these produce errors. They produce a system that confidently answers from garbage, which is worse.

What RAGFlow does about it

It uses layout-aware parsing with different templates for different document types: papers, manuals, tables, presentations, invoices. Tables are recognised as tables and preserved. Structure informs how the document is chunked rather than being discarded.

It also shows you the chunks. Being able to see exactly what was extracted, and correct it, is the feature that turns debugging bad answers from guesswork into inspection.

Citations back to the source

Answers cite the specific chunk they came from, including its location in the original document. For anything where being wrong matters, that traceability is the point.

Models

Works with hosted providers and local models through Ollama or an OpenAI-compatible endpoint.

Running it

Docker Compose with Elasticsearch or Infinity for retrieval, plus MySQL and Redis. It is heavier than AnythingLLM and the document parsing is more demanding than most.

Where it fits

Choose RAGFlow when your source material is difficult: technical manuals, financial documents with tables, scanned archives, or anything where a wrong answer has consequences.

Choose AnythingLLM when your documents are straightforward and you want the simplest thing that works.

License

RAGFlow is released under the Apache License 2.0.