ragflow
by infiniflow
RAG engine for building retrieval and question answering over your own documents.
- Stars
- 94,670 stars
- Forks
- 11k forks
- Last push
- today
- Activity
- Active
# Clone and enter the Docker folder$ git clone https://github.com/infiniflow/ragflow.git
cd ragflow/docker
git checkout v1.0.0# Start RAGFlow$ docker compose -f docker-compose.yml up -dCommands from the project's README. Run them after installing (see below).
Overview
Understand ragflow in 60 seconds
- What it does
- RAGFlow is an open-source retrieval-augmented generation (RAG) engine with agent capabilities. It reads complex documents like PDFs, Word files, slides, spreadsheets and scans, splits them into searchable chunks, and answers questions about them with traceable citations.
- The problem it solves
- Chatbots that answer from your documents often give vague or made-up answers, especially with messy file formats. RAGFlow focuses on deep document understanding and grounded citations, so you can see exactly where each answer came from.
- Why choose it
- Choose it when document parsing quality and citations matter. It's a full server with several services, so it needs a reasonably sized machine.
- Who should use it
- Teams building question answering over company documents
- Developers who need RAG with citations through an API
- Organisations with complex files like scanned PDFs and spreadsheets
- Businesses wanting a self-hosted knowledge assistant
- Setup difficulty
You'll need:
- 4 CPU cores, 16 GB RAM and 50 GB disk recommended to start
- Docker 24.0.0+ and Docker Compose v2.26.1+
- An LLM, embedding model and reranker (API or local)
How ragflow works
RAGFlow extracts knowledge from unstructured data with complicated formats using deep document understanding, and uses template-based chunking that you can inspect and adjust. Answers come with key references and traceable citations.
Version 1.0.0 was released on 2026-11-06. Recent additions include agentic retrieval with Low, Medium, High and Ultra thinking modes, Knowledge Compilation that turns documents into wikis, graphs, mind maps and timelines, website ingestion through sitemaps, and Google BigQuery ingestion.
You can use the cloud service at cloud.ragflow.io or deploy it yourself with Docker Compose. After signing in, you add an LLM, an embedding model and a reranker on the model provider page. It also offers APIs for integrating with your business systems.
Features
Key features
Deep document understanding
Handles complex PDFs, scans, Office files and more.
Template-based chunking
Explainable chunking you can adjust.
Grounded citations
See the references behind every answer.
Agentic retrieval
Multi-step retrieval with thinking modes.
Knowledge Compilation
Generate wikis, graphs and timelines.
APIs
Integrate RAG into your own apps.
Strengths
- Strong document parsing
- Traceable citations reduce hallucinations
- Self-hostable with Docker
- Apache-2.0 licensed
Limitations
- Needs a fairly large machine (16 GB RAM recommended)
- Several services to run
- In the 1.0 open-source release, document parsing uses CPU inference
Practical use cases
Internal knowledge base
Answer staff questions from policies and manuals.
Contract and report analysis
Query long documents with citations.
Customer support
Ground answers in product documentation.
Installation
Install ragflow
Commands come from RAGFlow's README. AIRepoHub hasn't run them yet. View source
Prerequisites
- Docker and Docker Compose
- 16 GB RAM
Supported systems
- Linux
- macOS
- Windows
- 1
If you use Elasticsearch, raise vm.max_map_count
Usually unnecessary with Infinity.
Shellsudo sysctl -w vm.max_map_count=262144 - 2
Clone the repository
Shellgit clone https://github.com/infiniflow/ragflow.git - 3
Check out the release and start
Shellcd ragflow/dockergit checkout v1.0.0docker compose -f docker-compose.yml up -d - 4
Check it's ready
Wait for an HTTP 200 response.
Shellcurl -f http://localhost/api/v1/system/healthz
- 1
Sign up at cloud.ragflow.io
Use the hosted service instead of deploying it.
Configuration and API keys
| Setting | What it's for |
|---|---|
SVR_WEB_HTTP_PORTOptional | Web port in docker/.env; change the health-check URL if you change it. |
First run
- 1
Open RAGFlow
Go to http://IP_OF_YOUR_MACHINE (port 80 by default) and sign in.
- 2
Add models
On the model provider page, add an LLM, an embedding model and a reranker with their API keys.
ragflow's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.
Your first project
Deploy RAGFlow and ask questions about your documents
Run RAGFlow with Docker and connect your models.
Before you start
- Docker 24.0.0+ and Compose v2.26.1+
- 4 CPU cores, 16 GB RAM, 50 GB disk
- API keys for an LLM, embedding model and reranker
- 1
Start the services
Shellgit clone https://github.com/infiniflow/ragflow.gitcd ragflow/dockergit checkout v1.0.0docker compose -f docker-compose.yml up -d - 2
Wait until it's healthy
Shellcurl -f http://localhost/api/v1/system/healthz - 3
Sign in and add models
Open http://IP_OF_YOUR_MACHINE, then add an LLM, embedding model and reranker on the model provider page.
- 4
Upload documents and chat
Create a dataset, upload files, and ask questions in a chat assistant.
What to expect
RAGFlow parses your documents into chunks and answers questions with citations you can trace back to the source.
Next steps
- Try Knowledge Compilation
- Use agentic retrieval for complex questions
- Read the Docker configuration guide
Costs and requirements
What it costs to run
- License
- Apache-2.0.Free
- Self-hosted
- Free software; you pay for servers.Free
- RAGFlow Cloud
- Hosted service at cloud.ragflow.io.Depends
- Models
- LLM, embedding and reranker providers bill separately.Depends
Troubleshooting
Common setup issues
Elasticsearch won't start
Set vm.max_map_count to at least 262144, and add it to /etc/sysctl.conf to keep it after reboots.
Startup fails
Inspect the logs with docker logs --tail 50 ragflow-cpu.
Web UI not ready yet
Wait until the health check returns HTTP 200; the container being up doesn't mean it's ready.
Alternatives
Similar AI repositories
dify
langgenius
Visual workspace for building agentic workflows and RAG pipelines, self-hosted or in the cloud.
graphify
Graphify-Labs
Agent skill that turns a codebase and its docs into a searchable knowledge graph for Claude Code, Cursor, Codex and Gemini CLI.
generative-ai-for-beginners
microsoft
Free Microsoft course of 21 lessons that teaches beginners how to build applications with generative AI.
claude-mem
thedotmack
Memory add-on for AI coding agents that saves what happened in past sessions and brings the useful parts back later.