RAGFlow
Free value-added services
AI agent AI Agent

RAGFlow

An open-source RAG engine that emphasizes document understanding and traceable retrieval.

Tags:

What is RAGFlow?

RAGFlow is an open-source retrieval-enhanced generation engine and AI Agent platform developed by the InfiniFlow team. It integrates document collection, layout understanding, chunking, vectorization, full-text search, reordering, question answering, Agent workflows, and APIs into a single system, with the goal of creating a traceable and manageable context layer for large language models.

Unlike lightweight knowledge bases that simply divide plain text into chunks of fixed length, RAGFlow places more emphasis on the complex structure of documents. It can identify headings, paragraphs, tables, images, and page layouts, and allows users to view and modify each chunk as well as its position; it is suitable for contracts, financial reports, papers, operation manuals, scanned documents, and complex Office files.

Core functions

1. In-depth document understanding

It features DeepDoc and an orchestrable Ingestion Pipeline for parsing Word, Slide, Excel, TXT, images, scans, structured data, and web pages. The system can use OCR, layout analysis, and multimodal models to extract text, tables, and image content, while preserving the document’s structure and metadata.

The new version also allows the selection of parsing backends such as MinerU, Docling, and OpenDataLoader. Different parsers yield varying results when dealing with scanned documents, two-column papers, formulas, complex tables, and large files; it is necessary to conduct sample previews before adding the content to the database, as not all PDFs can be converted without loss of quality.

2. Template-based partitioning

RAGFlow provides different chunking templates based on the type of document, such as general documents, books, papers, legal documents, Q&A formats, tables, images, and knowledge graphs. These templates take into account the hierarchy of headings, paragraph boundaries, and layout information; users can view the resulting chunks in the interface and make manual adjustments to them.

The chunking determines the granularity of the search. If the chunks are too small, context is lost; if they are too large, noise and token costs increase.

Each template should be validated using real-world problems, and the delimiters, block sizes, overlaps, and metadata should be adjusted according to the available data.

3. Vectors, BM25, and hybrid retrieval

The retrieval layer supports both vector semantic search and BM25 full-text search; it is possible to set weights for each of these methods and to combine the results obtained from them. Vectors are suitable for handling synonymous expressions, while BM25 is appropriate for numbers, names, product models, and exact terms.

The rearrangement model will once again assess the relevance of the candidate segments to the question.

By default, the system can use Elasticsearch to store full texts and vectors; it is also possible to switch to the open-source Infinity document engine from InfiniFlow. Switching document engines involves reconstructing the data or even deleting existing volumes, and it is not possible to execute migration commands in a production environment without first creating backups.

4. Traceable Q&A and citations

The chat assistant will display the document sections and citations on which the answer is based, allowing users to quickly return to the original text for verification. The retrieval test page enables separate viewing of the retrieved content, similarity levels, and sorting criteria, which helps to distinguish between cases where the correct information cannot be found and cases where the model accesses the relevant information but provides an incorrect answer.

Citations merely indicate that a certain excerpt is being used by the system; they do not guarantee that the conclusions drawn are complete or accurate. Legal, medical, financial, and research reports still require manual reading of the original text to verify dates, versions, unit specifications, and any exceptional provisions.

5. RAPTOR, PageIndex, and knowledge graphs

RAPTOR performs hierarchical clustering and summarization of documents or datasets, enabling the system to retrieve details as well as identify high-level themes across different sections. The new version offers GMM and AHC modes; AHC extends semantic organization to the entire dataset.

PageIndex uses directory and hierarchical information to locate content within long documents.

Knowledge graph parsing enables the extraction of entities and relationships, providing structured connections for multi-hop problems. Such advanced indexes increase parsing time, model invocation costs, and storage requirements; they may also lead to inaccurate summaries or incorrect entities. It is advisable to implement them only after confirming their benefits through evaluation data.

6. Data source connection and synchronization

In addition to local uploads, RAGFlow can connect to various data sources such as S3, Google Drive, Notion, Confluence, Discord, GitHub, GitLab, Bitbucket, Gmail, IMAP, Zendesk, RSS, Seafile, Airtable, Asana, Moodle, DingTalk AI Tables, as well as standard REST APIs.

Some connectors support incremental synchronization and remote deletion synchronization.

The data source connector requires an access token or a service account. Read-only permissions with the narrowest possible scope should be used, the directories to be synchronized should be limited, and deletion propagation rules must be confirmed.

After updates to remote documents, re-parsing may change the Chunk IDs and references; therefore, production applications need to implement indexing windows as well as regression testing.

7. AI Agents and Visual Orchestration

The Agent canvas allows knowledge base searches, models, tools, code execution, browsers, document generation, search functions, and other agents to be combined into workflows. Official templates are provided for use in scenarios such as data analysis, investment research, legal case analysis, and manufacturing maintenance; it also supports multi-agent collaboration, autonomous planning, and user-level long-term memory.

Browser components enable AI to navigate and manipulate web pages; Python and JavaScript executors can generate charts and process files.

Such functions must be placed in a sandbox, with restrictions on networking, files, and execution time.

When the model operates web pages or code autonomously, human confirmation is required for key steps such as logging in, making payments, sending messages, and deleting content.

8. MCP and tools

RAGFlow can make use of MCP services within workflows, and it is also capable of starting official MCP servers to provide functions such as dataset retrieval and chatting to clients that support MCP. The new version includes a lightweight Python tool decorator to assist developers in registering functions.

MCP is in a phase of rapid development; its fields, authentication mechanisms, and the data returned by various tools may change from one version to another. Before integrating it with production agents, it is necessary to fix a specific version, test error handling procedures, and apply minimum permissions. Third-party MCP tools should not be assumed to have undergone official security audits.

9. REST API and SDK

Developers can use REST APIs and the official Python SDK to manage datasets, documents, chunks, chat assistants, sessions, agents, and search functions. The chat completion interface is compatible with common streaming call methods, making it easy to integrate RAGFlow into websites, customer service systems, internal applications, and automated tasks.

API Keys should be stored only on the server side, where they can be used to isolate resources based on tenants, limit the frequency of requests, and maintain audit records. The free version of the official cloud service does not provide API Keys; API capabilities are available only in the Starter and Pro versions.

10. Multi-model support

The platform allows the configuration of various language models, Embedding services, Reranking tools, as well as providers for speech, vision, and image generation; it also enables connection to local model services. Starting from version 0.22, self-hosted images no longer include Embedding models, so it is necessary to use external or local model endpoints.

The cost of cloud models is calculated separately from the cost of the RAGFlow software. Whenever the vector model is changed, the index must be regenerated;

Local large models and OCR acceleration also require additional GPU resources.

11. Multi-channel distribution

Chat, Agent, and search pages can embed third-party websites; the new version of these embedded pages is compatible with mobile devices and supports messaging platforms such as Lark, Discord, Telegram, and Line. Before publishing, it is necessary to configure settings related to identity, session isolation, quotas, content moderation, and permissions for downloading references.

Cloud service prices

The official RAGFlow cloud service offers three monthly subscription plans in USD; the original price is displayed with a strikethrough on the page, while the prices shown here are the current discounted rates.

Package or versionPrices, quotas, and core benefits
Free$
Starter29 dollars per month: 50 apps, 5 users, 5GB of data storage, and 5000 Credits per month; an API Key is also provided. The original price for this package was 59 dollars per month.
Pro129 dollars per month: unlimited number of apps, 20 members, 50GB of data storage space, 20,000 Credits per month, and API keys are provided; the original price was 259 dollars per month.

The specific amount of Credits consumed depends on the model, the analysis processes, and the tasks being carried out. Package prices, discounts, and resource limitations may change; it is necessary to refer to the settlement page for accurate information. For higher capacity, private deployment options, and SLA guarantees tailored for large enterprises, it is required to contact the official party or service provider.

Self-hosting and hardware requirements

RAGFlow can be deployed privately using Docker Compose. The minimum requirements specified by the developers are a 4-core CPU, 16GB of memory, 50GB of disk space, Docker version 24.0 or higher, and Docker Compose version 2.26.1 or higher; for developing the code, Python 3.13 or higher is required.

gVisor is also required when using code execution sandboxes.

The official pre-built images are currently available for the x86 platform only; no ARM64 images are provided directly, and ARM64 users need to build them themselves. Starting with version 0.22, only compact images of around 2GB are released, and these do not include embedding models.

After the image is extracted and executed, its size is around 7GB; documents, indexes, logs, and databases will continue to increase the disk usage.

The default dependencies typically include MySQL, MinIO, Redis, as well as Elasticsearch or Infinity. Elasticsearch requires that the amount of virtual memory mapped by the host be at least 262144.

The production environment also requires HTTPS, persistent volumes, backups for databases and object storage, monitoring, key rotation, and rollback capabilities.

GitHub and open-source licenses

The source code for RAGFlow is hosted on InfiniFlow’s official GitHub repository, and it is licensed under the Apache License 2.0, which permits its use, modification, distribution, and commercial exploitation under the conditions specified in the license and the NOTICE file. The official Python SDK is also licensed under Apache 2.0.

As of this verification, the official documentation and the default Docker configuration use version 0.26.4, the stable version. The project is still in the 0.x stage and is updated frequently, so the APIs, databases, and connectors may change.

During deployment, ensure that the image and the code are of the same version, and read the upgrade script and release notes.

Data security and operations management

Private deployment allows files, indexes, and sessions to be kept within one’s own environment; however, if external LLMs, Embedding services, Reranking tools, OCR solutions, or search services are used, the relevant text and snippets will still be transmitted to third parties. For sensitive documents, it is necessary to review the supplier’s policies regarding data retention, training, and geographic constraints, and where appropriate, use entirely local models.

Code execution, browsers, connectors, and MCPs expand the attack surface. It is necessary to enable sandboxes, minimal permissions, network whitelists, restrictions on file size and type, protection against prompt injection, log anonymization, and patch management.

The default passwords for databases and object storage in the configuration file must be changed.

RAGFlow Usage Tutorial

Complete a basic task.

  1. Register RAGFlow and create an API Key intended solely for the testing environment;
  2. Select a model based on input type, context, quality, speed, and price;
  3. First, invoke deep document understanding to complete the minimal request and check the returned structure;
  4. Use templated partitioning to test stream output, parameters, and exception responses;
  5. Record Tokens, number of calls, latency, error rate, and cost per call;
  6. Move the key to the server-side key manager before integrating it into the actual application;

Create reusable professional workflows

  1. Different keys and quotas are used for development, testing, and production environments;
  2. A representative evaluation set is established based on in-depth document understanding, template-based chunking and vectors, as well as BM25 and hybrid retrieval methods.
  3. Set timeout, concurrency, retry, throttling, and budget limits;
  4. Perform checks on the output regarding facts, security, format, and sensitive information;
  5. Monitor changes in model version, price, latency, and failure rate;
  6. Prepare plans for downgrading the model, implementing circuit breaking, and taking manual control;

Which users is it suitable for?

  • Companies that need to analyze financial reports, papers, contracts, manuals, and scanned documents;
  • RAG projects that pay attention to the layout of tables, images, and documents;
  • R&D teams that need to handle mixed retrieval, reordering, RAPTOR, and knowledge graphs;
  • Organizations that wish to connect to a large number of cloud storage services, collaboration platforms, and business data sources;
  • Developers who need Agent workflows, code, a browser, and MCP tools;
  • Teams that wish to integrate the search context into their existing products via API or SDK.

Product advantages

  • Complex document parsing and visualization of chunks are its key features;
  • Vectors, BM25, as well as multiple retrieval and reordering methods are all available;
  • References are traceable, which facilitates the location and manual correction of knowledge segments;
  • It supports advanced indexing methods such as RAPTOR,PageIndex, and knowledge graphs;
  • Data source connectors, Agents, MCP, APIs, and SDKs offer broad coverage;
  • The Apache 2.0 license is favorable for commercial integration;
  • It also offers official cloud services as well as complete private deployment solutions.

Restrictions and Precautions

  • The RAGFlow component has many components, requires high amounts of resources, and its maintenance complexity is generally higher than that of lightweight knowledge bases.
  • The official minimum of 16GB of memory is only sufficient for basic use – handling large volumes of documents, high concurrent loads, OCR tasks, and local models requires higher specifications as well as proper cluster setup.
  • Even in-depth analysis cannot guarantee that all files are correct;
  • After uploading, a sample check must be conducted on the text, tables, images, Chunks, and references;
  • Advanced indexes increase costs and wait times;
  • Version 0.x is updated frequently, and the nightly images should not be used in production environments;

Frequently Asked Questions

Is RAGFlow free?

The self-hosted open-source version is free, but the costs for servers and models have to be covered by the user; the official cloud service offers a free version at no cost, while the Starter plan costs 29 dollars per month and the Pro plan costs 129 dollars per month.

Does RAGFlow support Chinese?

It supports a Chinese interface, document parsing, searching, and various Chinese language models. The quality of OCR, word segmentation, and responses depends on the configurations of the parser, embeddings, reranking mechanisms, and LLMs.

What is the minimum server requirement?

The minimum requirements specified by the officials are a 4-core CPU, 16 GB of memory, and 50 GB of storage space; gVisor is needed to execute the code. A GPU is not essential for startup, but it can speed up the operation of DeepDoc and local models.

Is it compatible with ARM servers?

The officially provided pre-built Docker images are designed for x86 architecture, and no ARM64 images are available; ARM users must build them themselves following the relevant documentation, and some Infinity combinations are not yet officially supported.

Does RAGFlow provide APIs?

REST APIs, Python SDKs, and MCP servers are provided. The official free cloud plan does not offer API keys, while they are available in the Starter and Pro versions.

Can RAGFlow be used commercially?

It can be used, modified, and distributed under the Apache 2.0 license; the license and related statements must remain intact, and the licenses of any models, data, and third-party components used must also be complied with.

©️Copyright notice: Unless otherwise specified, all articles on this site are copyrighted bySharing of AI toolsAll content on this site is original; without permission, no individual, media outlet, website, or organization may reproduce, copy, or otherwise distribute it, nor may they create mirrors of it on servers that are not owned by this site. Otherwise, we reserve the right to take legal action against such parties in accordance with the law.

Tools similar to RAGFlow