Tutorials

How to Use RAGFlow: Build an AI Assistant That Answers From Your Documents

Turn your own documents into an AI assistant with RAGFlow — install it with Docker, upload files, and get cited answers from your knowledge base.

RAGFlow tutorial: business documents used for AI question answering
Image: Pixabay / Pixabay Content License
Time Required
About 1 Hour
Difficulty
Intermediate (Docker)
Tools Covered
RAGFlow + Docker

What You'll Learn (Key Takeaways)

  • RAGFlow is a free, open-source RAG engine that answers questions from your own documents with citations.
  • Install with Docker on a machine with 4 CPU cores, 16 GB RAM, and 50 GB disk; check readiness with the health endpoint.
  • Add an LLM, embedding model, and reranker, create a knowledge base, upload documents, and pick a chunking template.
  • Bottom line: worth it when your team answers the same document-based questions every day — start with a 10-question test.

What It Is

RAGFlow is an open-source Retrieval-Augmented Generation (RAG) engine that combines RAG with agent capabilities to build a context layer for large language models. In plain terms, it lets an AI assistant answer questions using your own documents, instead of guessing from its training data alone. The README describes a streamlined RAG workflow adaptable to enterprises of any scale, with a converged context engine and pre-built agent templates. It supports deep document understanding, template-based chunking, knowledge compilation, agentic retrieval, and grounded citations designed to reduce hallucinations. On GitHub, the repository infiniflow/ragflow has about 92,371 stars and is released under the Apache-2.0 licence. For a small business, RAGFlow turns a pile of manuals, policies, FAQs, and contracts into an assistant staff can actually ask questions of.

Who It’s For / SMB Use Case

RAGFlow fits businesses whose knowledge lives in documents. A support team can answer customer questions from real help articles, return policies, and product manuals, with citations back to the source. A consultancy or agency can let new hires ask about internal playbooks, pricing rules, and onboarding guides instead of interrupting senior staff. A clinic, school, or trades business can build an assistant that answers questions from its own procedures and compliance documents. It also suits a business that wants to offer a document-aware assistant on its own server rather than uploading files to a hosted service. RAGFlow is the heaviest tool in this batch to run, so it fits teams that already have server experience or a developer. If you only have a handful of documents, a simpler desktop tool may be enough. RAGFlow pays off when the document collection is large, growing, and used every day.

Installation

The README supports Docker deployment and launching from source. Docker is the right choice for most small businesses: it suits quick evaluation, integration testing, and production deployment, and it does not require a Go compiler. Launching from source is intended for RAGFlow development and debugging.

Prerequisites

  • Recommended starting configuration: 4 CPU cores, 16 GB RAM, and 50 GB of available disk space, per the README. Actual needs depend on the document engine, data volume, parsing tasks, and concurrency.
  • Docker version 24.0.0 or newer, and Docker Compose v2.26.1 or newer.
  • If you use Elasticsearch, set vm.max_map_count on the Docker host to at least 262144. Check the current value with sysctl vm.max_map_count and, if needed, set it with sudo sysctl -w vm.max_map_count=262144.

Start the server with Docker

  1. Clone the repository:
    git clone https://github.com/infiniflow/ragflow.git
  2. Enter the Docker deployment directory:
    cd ragflow/docker
  3. Check out the release tag from the README:
    git checkout v1.0.0-rc2
  4. Start the services:
    docker compose -f docker-compose.yml up -d
  5. Check that the server is ready:
    curl -f http://localhost/api/v1/system/healthz

    An HTTP 200 response means RAGFlow is ready. If startup fails, the README suggests inspecting the logs with docker logs --tail 50 ragflow-cpu.

  6. Open http://IP_OF_YOUR_MACHINE in your browser and log in. With the default settings, no port number is needed, because the default HTTP serving port is 80. Check the platform support notes in the official docs before deploying on macOS.

How to Use

  1. Add your model providers. After signing in, the README instructs you to add an LLM, an embedding model, and a reranker on the model provider page, including the model name, service address, and API key. For details, see the llm_api_key_setup page in the official docs. Do this first: nothing else works well until the models are connected.
  2. Create a knowledge base and upload documents. Create a knowledge base for one topic, such as support policies or product manuals, and upload your files. RAGFlow supports Word documents, PowerPoint presentations, Excel spreadsheets, TXT files, images, PDFs, scanned copies, structured data, web pages, and more, according to the README. Start with 10 to 20 representative documents, not your entire archive.
  3. Choose a chunking template. RAGFlow uses template-based chunking to split documents into searchable pieces. Pick the template that matches your document type, and use the chunking visualisation to check how your files are split. If answers come back vague, the chunking settings are the first place to adjust. For the exact options, see the Quickstart guide in the official docs.
  4. Create a chat assistant and ask questions. Connect your knowledge base to a chat assistant, then ask the kind of questions staff actually ask, such as “What is our refund window for custom orders?” Check that the answers cite the right documents. The README highlights grounded citations and traceable references, so treat any answer without a citation as unverified.
  5. Test, then expand. Run a small test set of 10 questions with known answers. Fix the documents, chunking, or prompts behind any wrong answer, then add more documents in batches. For advanced options such as agentic retrieval thinking modes and knowledge compilation, check the official docs.

Pricing / Limitations

RAGFlow is free, open-source software under the Apache-2.0 licence, so there is no licence fee for the self-hosted version. Your real costs are the server, which needs meaningful resources, and the model APIs you connect, since most setups still pay a model provider per token. The README also points to a cloud service at cloud.ragflow.io, so if you prefer not to self-host, check the official cloud pricing page for current rates. The limitations are mostly operational. The recommended starting configuration is 4 CPU cores, 16 GB RAM, and 50 GB of disk, and real workloads can need more. Setup and maintenance take real effort, and answer quality depends on your documents, your chunking settings, and your models. RAGFlow reduces hallucinations with citations, but it does not eliminate them, so keep a human in the loop for anything customer-facing or compliance-sensitive.

Bottom Line for SMB

RAGFlow is worth the effort when your team answers the same document-based questions every day. Start with Docker, one knowledge base, and a small set of well-organised documents. If staff get correct, cited answers to their real questions, expand the collection. If not, fix the documents and chunking before adding more.

FAQ

Do I need to write code to use RAGFlow?

No, for the standard workflow. The README describes a web UI where you log in, add model providers, upload documents, and chat with an assistant. Code is only needed for custom integrations through the APIs.

What file types can RAGFlow handle?

According to the README: Word documents, PowerPoint presentations, Excel spreadsheets, TXT files, images, PDFs, scanned copies, structured data, web pages, and more.

Can RAGFlow replace a human support agent?

No. It is best used as a fast, cited first draft for document-based answers. Keep a human in the loop for customer-facing replies, refunds, and anything compliance-sensitive.

Related reading: Best AI Customer Support Tools and AI Customer Support Macros Tutorial.

Frequently Asked Questions

Do I need to write code to use RAGFlow?

No, for the standard workflow. Use the web UI to log in, add model providers, create a knowledge base, upload documents, and ask questions.

What file types can RAGFlow handle?

According to the README: Word documents, PowerPoint presentations, Excel spreadsheets, TXT files, images, and more. Check the official docs for the full list.

Can RAGFlow replace a human support agent?

No. It is best used as a fast, cited first draft for document-based answers. Keep a human in the loop for final answers.

WebGool Tech Senior AI & Small Business Editor
Verified Contributor

Keep Reading

More in Tutorials

Explore all

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top