开源项目 GitHub Topic rag 2026-07-06T12:02 正文 ok 1414 words

📦 infiniflow/ragflow

英文标题:📦 infiniflow/ragflow

RAGFlow 是领先的开源检索增强生成(RAG)引擎,将前沿 RAG 与 Agent 能力相结合,为 LLM 打造优质上下文层。它提供适用于任意规模企业的简化 RAG 工作流,支持深度文档理解、模板化分块与可溯源引用,帮助开发者高效构建生产级 AI 系统。最新版本支持智能体工作流、MCP、多数据源同步以及多种模型接入。
打开原文相关 6.3 · 机会 7
media10.5 KB media1002 B media1.0 KB media1.0 KB media1012 B media1012 B media1012 B media1.0 KB media1.0 KB media997 B media1007 B media1.7 KB media1.2 KB media3.0 KB media1.3 KB media1.3 KB media1.9 KB media808.7 KB media5.1 KB media2.8 MB

中文

英文版 README 简体中文版自述文件 繁體版中文自述文件 日本語のREADME 한국어 README en Français Bahasa Indonesia Português(Brasil) README in Arabic Türkçe README

在 X(Twitter) 上关注 Static Badge docker pull infiniflow/ragflow:v0.26.3 Latest Release license Ask DeepWiki

📕 目录

RAGFlow 是领先的开源检索增强生成(RAG)引擎,将前沿 RAG 与 Agent 能力融合,为 LLM 创建出色的上下文层。它提供简化的 RAG 工作流,适应任何规模的企业。借助融合型上下文引擎和预构建的代理模板,RAGFlow 让开发者能够高效、精准地将复杂数据转化为高保真、可直接投入生产的 AI 系统。

欢迎试用我们的云服务:https://cloud.ragflow.io。

  • 2026-06-15 支持多个聊天渠道,如飞书、Discord、Telegram、Line 等。
  • 2026-04-24 支持 DeepSeek v4。
  • 2026-03-24 OpenClaw 上的 RAGFlow Skill — 提供通过 OpenClaw 访问 RAGFlow 数据集的官方技能。
  • 2025-12-26 AI 代理支持“Memory”。
  • 2025-11-19 支持 Gemini 3 Pro。
  • 2025-11-12 支持从 Confluence、S3、Notion、Discord、Google Drive 同步数据。
  • 2025-10-23 支持 MinerU 和 Docling 作为文档解析方法。
  • 2025-10-15 支持可编排的文档摄取管道。
  • 2025-08-08 支持 OpenAI 最新 GPT-5 系列模型。
  • 2025-08-01 支持代理工作流和 MCP。
  • 2025-05-23 在 Agent 中添加 Python/JavaScript 代码执行器组件。
  • 2025-03-19 支持使用多模态模型理解 PDF 或 DOCX 文件中的图像。

⭐️ 给我们的仓库点亮 Star,及时获取新功能和改进的通知!🌟

🍭 “质量进,质量出”

  • 基于深度文档理解的知识提取,适用于格式复杂的非结构化数据。
  • 在近乎无限的 token 数据中“大海捞针”。

🍱 基于模板的分块

  • 智能且可解释。
  • 丰富的模板选项可供选择。

🌱 有依据的引用与更少的幻觉

  • 可视化文本分块,支持人工干预。
  • 快速查看关键参考文献和可追溯的引用,支撑有据可依的回答。

🍔 兼容异构数据源

  • 支持 Word、幻灯片、Excel、txt、图片、扫描件、结构化数据、网页等多种格式。

🛀 自动化的轻量 RAG 工作流

  • 简化的 RAG 编排,兼顾个人与大型企业。

  • 可配置的 LLM 及 Embedding 模型。

  • 多重召回搭配融合重排序。

  • 直观的 API,便于与业务无缝集成。

  • CPU >= 4 核

  • 内存 >= 16 GB

  • 磁盘 >= 50 GB

  • Docker >= 24.0.0 且 Docker Compose >= v2.26.1

  • Python >= 3.13

  • gVisor:仅在使用 RAGFlow 的代码执行器(沙箱)功能时需要。

提示

如果你尚未在本地机器(Windows、Mac 或 Linux)上安装 Docker,请参阅安装 Docker 引擎。

  1. 确保 vm.max_map_count >= 262144:

查看 vm.max_map_count 的值:

     $ sysctl vm.max_map_count

如果该值未达到 262144,请将其重置为至少 262144。

     # 在本示例中,我们将其设置为 262144:
     $ sudo sysctl -w vm.max_map_count=262144

更改将在系统重启后失效。要使更改永久保留,请在 /etc/sysctl.conf 中相应地添加或更新 vm.max_map_count 值:

  1. 克隆仓库:

    $ git clone https://github.com/infiniflow/ragflow.git
    
  2. 使用预构建的 Docker 镜像启动服务器:

注意

所有 Docker 镜像均面向 x86 平台构建,目前暂不提供 ARM64 的 Docker 镜像。如果你使用 ARM64 平台,请按照此指南构建与你的系统兼容的 Docker 镜像。

以下命令将下载 v0.26.3 版本的 RAGFlow Docker 镜像。不同 RAGFlow 版本的说明见下表。如需下载 v0.26.3 以外的版本,请在使用 docker compose 启动服务器前,在 docker/.env 文件中相应更新 RAGFLOW_IMAGE 变量。

   $ cd ragflow/docker

   # git checkout v0.26.3
   # 可选:使用稳定标签(参见 releases: https://github.com/infiniflow/ragflow/releases)
   # 此步骤确保代码中的 **entrypoint.sh** 文件与 Docker 镜像版本一致。

   # 使用 CPU 处理 DeepDoc 任务:
   $ docker compose -f docker-compose.yml up -d

   # 使用 GPU 加速 DeepDoc 任务:
   # sed -i '1i DEVICE=gpu' .env
   # docker compose -f docker-compose.yml up -d

注意:在 v0.22.0 之前,我们同时提供包含嵌入模型的镜像和精简版(无嵌入模型)镜像。详情如下:

RAGFlow 镜像标签 镜像大小(GB) 是否包含嵌入模型? 是否稳定?
v0.21.1 ≈9 ✔️ 稳定版
v0.21.1-slim ≈2 ❌ 稳定版

从 v0.22.0 开始,我们仅提供精简版,且不再在镜像标签后附加 -slim 后缀。

  1. 服务器启动后,检查服务状态:

    $ docker logs -f docker-ragflow-cpu-1
    

以下输出表示系统已成功启动:

     ____   ___    ______ ______ __
          / __ \ /   |  / ____// ____// /____  _      __
         / /_/ // /| | / / __ / /_   / // __ \| | /| / /
        / _, _// ___ |/ /_/ // __/  / // /_/ /| |/ |/ /
       /_/ |_|/_/  |_|\____//_/    /_/ \____/ |__/|__/
     
      * Running on all addresses (0.0.0.0)

如果跳过此确认步骤直接登录 RAGFlow,浏览器可能会提示“网络异常”错误,因为此时 RAGFlow 可能尚未完全初始化。

  1. 在浏览器中输入服务器的 IP 地址并登录 RAGFlow。

使用默认设置时,只需输入 http://你的机器IP(无需端口号),因为默认 HTTP 服务端口 80 在使用默认配置时可省略。

  1. 在 service_conf.yaml.template 中,在 user_default_llm 里选择所需的 LLM 工厂,并用对应的 API 密钥更新 API_KEY 字段。

更多信息请参见 llm_api_key_setup。

好戏开场!

关于系统配置,你需要管理以下文件:

  • .env:保存系统的基本设置,如 SVR_HTTP_PORT、MYSQL_PASSWORD 和 MINIO_PASSWORD。
  • service_conf.yaml.template:配置后端服务。该文件中的环境变量会在 Docker 容器启动时自动填充。你在 Docker 容器内设置的任何环境变量都可使用,以便根据部署环境自定义服务行为。
  • docker-compose.yml:系统依赖 docker-compose.yml 启动。

./docker/README 文件详细描述了环境设置和服务配置,这些配置可在 service_conf.yaml.template 中作为 ${ENV_VARS} 使用。

要修改默认的 HTTP 服务端口(80),请前往 docker-compose.yml,将 80:80 改为 <你的服务端口>:80。

对上述配置的更新需要重启所有容器方能生效:

$ docker compose -f docker-compose.yml up -d

将文档引擎从 Elasticsearch 切换为 Infinity

RAGFlow 默认使用 Elasticsearch 存储全文和向量。要切换为 Infinity,请按以下步骤操作:

  1. 停止所有正在运行的容器:

    $ docker compose -f docker/docker-compose.yml down -v
    

警告

-v 会删除 docker 容器的卷,现有数据将被清除。

  1. 在 docker/.env 中将 DOC_ENGINE 设置为 infinity。

  2. 启动容器:

    $ docker compose -f docker-compose.yml up -d
    

警告

在 Linux/arm64 机器上切换至 Infinity 暂未获得官方支持。

此镜像大小约 2 GB,并依赖外部的 LLM 和嵌入服务。

git clone https://github.com/infiniflow/ragflow.git
cd ragflow/
docker build --platform linux/amd64 -f Dockerfile -t infiniflow/ragflow:nightly .

或者,如果你处于代理后,可以传入代理参数:

docker build --platform linux/amd64 \
  --build-arg http_proxy=http://你的代理:端口 \
  --build-arg https_proxy=http://你的代理:端口 \
  -f Dockerfile -t infiniflow/ragflow:nightly .

🔨 从源码启动服务用于开发

重要 克隆仓库后(After cloning th)

English / 原文

README in English 简体中文版自述文件 繁體版中文自述文件 日本語のREADME 한국어 README en Français Bahasa Indonesia Português(Brasil) README in Arabic Türkçe README

follow on X(Twitter) Static Badge docker pull infiniflow/ragflow:v0.26.3 Latest Release license Ask DeepWiki

📕 Table of Contents

RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs. It offers a streamlined RAG workflow adaptable to enterprises of any scale. Powered by a converged context engine and pre-built agent templates, RAGFlow enables developers to transform complex data into high-fidelity, production-ready AI systems with exceptional efficiency and precision.

Try our cloud service at https://cloud.ragflow.io.

  • 2026-06-15 Support multiple chat channels such as Feishu, Discord, Telegram, Line, etc.
  • 2026-04-24 Supports DeepSeek v4.
  • 2026-03-24 RAGFlow Skill on OpenClaw — Provides an official skill for accessing RAGFlow datasets via OpenClaw.
  • 2025-12-26 Supports 'Memory' for AI agent.
  • 2025-11-19 Supports Gemini 3 Pro.
  • 2025-11-12 Supports data synchronization from Confluence, S3, Notion, Discord, Google Drive.
  • 2025-10-23 Supports MinerU & Docling as document parsing methods.
  • 2025-10-15 Supports orchestrable ingestion pipeline.
  • 2025-08-08 Supports OpenAI's latest GPT-5 series models.
  • 2025-08-01 Supports agentic workflow and MCP.
  • 2025-05-23 Adds a Python/JavaScript code executor component to Agent.
  • 2025-03-19 Supports using a multi-modal model to make sense of images within PDF or DOCX files.

⭐️ Star our repository to stay up-to-date with exciting new features and improvements! Get instant notifications for new releases! 🌟

🍭 "Quality in, quality out"

  • Deep document understanding-based knowledge extraction from unstructured data with complicated formats.
  • Finds "needle in a data haystack" of literally unlimited tokens.

🍱 Template-based chunking

  • Intelligent and explainable.
  • Plenty of template options to choose from.

🌱 Grounded citations with reduced hallucinations

  • Visualization of text chunking to allow human intervention.
  • Quick view of the key references and traceable citations to support grounded answers.

🍔 Compatibility with heterogeneous data sources

  • Supports Word, slides, excel, txt, images, scanned copies, structured data, web pages, and more.

🛀 Automated and effortless RAG workflow

  • Streamlined RAG orchestration catered to both personal and large businesses.

  • Configurable LLMs as well as embedding models.

  • Multiple recall paired with fused re-ranking.

  • Intuitive APIs for seamless integration with business.

  • CPU >= 4 cores

  • RAM >= 16 GB

  • Disk >= 50 GB

  • Docker >= 24.0.0 & Docker Compose >= v2.26.1

  • Python >= 3.13

  • gVisor: Required only if you intend to use the code executor (sandbox) feature of RAGFlow.

Tip

If you have not installed Docker on your local machine (Windows, Mac, or Linux), see Install Docker Engine.

  1. Ensure vm.max_map_count >= 262144:

To check the value of vm.max_map_count:

     $ sysctl vm.max_map_count

Reset vm.max_map_count to a value at least 262144 if it is not.

     # In this case, we set it to 262144:
     $ sudo sysctl -w vm.max_map_count=262144

This change will be reset after a system reboot. To ensure your change remains permanent, add or update the vm.max_map_count value in /etc/sysctl.conf accordingly:

  1. Clone the repo:

    $ git clone https://github.com/infiniflow/ragflow.git
    
  2. Start up the server using the pre-built Docker images:

Caution

All Docker images are built for x86 platforms. We don't currently offer Docker images for ARM64. If you are on an ARM64 platform, follow this guide to build a Docker image compatible with your system.

The command below downloads the v0.26.3 edition of the RAGFlow Docker image. See the following table for descriptions of different RAGFlow editions. To download a RAGFlow edition different from v0.26.3, update the RAGFLOW_IMAGE variable accordingly in docker/.env before using docker compose to start the server.

   $ cd ragflow/docker

   # git checkout v0.26.3
   # Optional: use a stable tag (see releases: https://github.com/infiniflow/ragflow/releases)
   # This step ensures the **entrypoint.sh** file in the code matches the Docker image version.

   # Use CPU for DeepDoc tasks:
   $ docker compose -f docker-compose.yml up -d

   # To use GPU to accelerate DeepDoc tasks:
   # sed -i '1i DEVICE=gpu' .env
   # docker compose -f docker-compose.yml up -d

Note: Prior to v0.22.0, we provided both images with embedding models and slim images without embedding models. Details as follows:

RAGFlow image tag Image size (GB) Has embedding models? Stable?
v0.21.1 ≈9 ✔️ Stable release
v0.21.1-slim ≈2 ❌ Stable release

Starting with v0.22.0, we ship only the slim edition and no longer append the -slim suffix to the image tag.

  1. Check the server status after having the server up and running:

    $ docker logs -f docker-ragflow-cpu-1
    

The following output confirms a successful launch of the system:

     ____   ___    ______ ______ __
          / __ \ /   |  / ____// ____// /____  _      __
         / /_/ // /| | / / __ / /_   / // __ \| | /| / /
        / _, _// ___ |/ /_/ // __/  / // /_/ /| |/ |/ /
       /_/ |_|/_/  |_|\____//_/    /_/ \____/ |__/|__/
     
      * Running on all addresses (0.0.0.0)

If you skip this confirmation step and directly log in to RAGFlow, your browser may prompt a network abnormal error because, at that moment, your RAGFlow may not be fully initialized.

  1. In your web browser, enter the IP address of your server and log in to RAGFlow.

With the default settings, you only need to enter http://IP_OF_YOUR_MACHINE (sans port number) as the default HTTP serving port 80 can be omitted when using the default configurations.

  1. In service_conf.yaml.template, select the desired LLM factory in user_default_llm and update the API_KEY field with the corresponding API key.

See llm_api_key_setup for more information.

The show is on!

When it comes to system configurations, you will need to manage the following files:

  • .env: Keeps the fundamental setups for the system, such as SVR_HTTP_PORT, MYSQL_PASSWORD, and MINIO_PASSWORD.
  • service_conf.yaml.template: Configures the back-end services. The environment variables in this file will be automatically populated when the Docker container starts. Any environment variables set within the Docker container will be available for use, allowing you to customize service behavior based on the deployment environment.
  • docker-compose.yml: The system relies on docker-compose.yml to start up.

The ./docker/README file provides a detailed description of the environment settings and service configurations which can be used as ${ENV_VARS} in the service_conf.yaml.template file.

To update the default HTTP serving port (80), go to docker-compose.yml and change 80:80 to <YOUR_SERVING_PORT>:80.

Updates to the above configurations require a reboot of all containers to take effect:

$ docker compose -f docker-compose.yml up -d

Switch doc engine from Elasticsearch to Infinity

RAGFlow uses Elasticsearch by default for storing full text and vectors. To switch to Infinity, follow these steps:

  1. Stop all running containers:

    $ docker compose -f docker/docker-compose.yml down -v
    

Warning

-v will delete the docker container volumes, and the existing data will be cleared.

  1. Set DOC_ENGINE in docker/.env to infinity.

  2. Start the containers:

    $ docker compose -f docker-compose.yml up -d
    

Warning

Switching to Infinity on a Linux/arm64 machine is not yet officially supported.

This image is approximately 2 GB in size and relies on external LLM and embedding services.

git clone https://github.com/infiniflow/ragflow.git
cd ragflow/
docker build --platform linux/amd64 -f Dockerfile -t infiniflow/ragflow:nightly .

Or if you are behind a proxy, you can pass proxy arguments:

docker build --platform linux/amd64 \
  --build-arg http_proxy=http://YOUR_PROXY:PORT \
  --build-arg https_proxy=http://YOUR_PROXY:PORT \
  -f Dockerfile -t infiniflow/ragflow:nightly .

🔨 Launch service from source for development

Important

After cloning the repository for the first time, run lefthook install once from the repo root to enable local Git hooks.

  1. Install uv, or skip this step if it is already installed:

  2. Clone the source code and install Python dependencies:

    git clone https://github.com/infiniflow/ragflow.git
    cd ragflow/
    uv sync --python 3.13 # install RAGFlow dependent python modules
    uv run python3 ragflow_deps/download_deps.py
    lefthook install
    
  3. Launch the dependent services (MinIO, Elasticsearch, Redis, and MySQL) using Docker Compose:

    docker compose -f docker/docker-compose-base.yml up -d
    

Add the following line to /etc/hosts to resolve all hosts specified in docker/.env to 127.0.0.1:

     127.0.0.1       es01 infinity mysql minio redis sandbox-executor-manager
  1. If you cannot access HuggingFace, set the HF_ENDPOINT environment variable to use a mirror site:

    export HF_ENDPOINT=https://hf-mirror.com
    
  2. If your operating system does not have jemalloc, please install it as follows:

    # Ubuntu
    sudo apt-get install libjemalloc-dev
    # CentOS
    sudo yum install jemalloc
    # OpenSUSE
    sudo zypper install jemalloc
    # macOS
    sudo brew install jemalloc
    
  3. Launch backend service:

    source .venv/bin/activate
    export PYTHONPATH=$(pwd)
    bash docker/launch_backend_service.sh
    
  4. Install frontend dependencies:

  5. Launch frontend service:

The following output confirms a successful launch of the system:

  1. Stop RAGFlow front-end and back-end service after development is complete:

    pkill -f "ragflow_server.py|task_executor.py"
    

See the RAGFlow Roadmap 2026

🏄 Community

RAGFlow flourishes via open-source collaboration. In this spirit, we embrace diverse contributions from the community. If you would like to be a part, review our Contribution Guidelines first.