RAGFlow

repository·main·Indexed 13 days ago

https://github.com/infiniflow/ragflow

An open-source Retrieval-Augmented Generation (RAG) engine that integrates advanced document parsing with agentic workflows to provide a high-fidelity context layer for LLMs. It includes an Admin Service for system health and user management, a secure gVisor-based code execution sandbox, a plugin mechanism for LLM tools, and support for OAuth2, OIDC, and GitHub authentication.

Tokens
231.5K
Snippets
559
Records
1K
Agent score
97%

What's inside RAGFlow

  1. Overview of RAGFlow ES to OceanBase Migration Tool

    main

    The es-ob-migrate tool is a CLI utility designed to migrate RAGFlow data from an Elasticsearch (ES) backend to an OceanBase backend. It is purpose-built for RAGFlow's specific data schema and includes features for:

    • Schema Conversion: Handles RAGFlow's fixed data structure and vector field dimension auto-detection.
    • Efficient Data Transfer: Uses the ES search_after API for high-performance scrolling.
    • Reliability: Supports batch processing, resume capability for interrupted migrations, and data consistency validation.
    • Reporting: Generates detailed migration and verification reports.
  2. Overview of Team Management in RAGFlow

    main

    RAGFlow's Team Management system allows you to collaborate by sharing resources among multiple users. By default, every user is assigned a personal team named after them. However, you can create or join teams to enable collaborative workflows.

    Collaborative Capabilities: When users join a shared team, they can collectively:

    • Upload documents to shared datasets.
    • Parse documents within those shared datasets.
    • Utilize shared Agents.

    Permissions Model:

    • Team Owner: The only role with authority to invite new users to the team or remove existing members.
    • Team Members: Can contribute to datasets and agents but lack administrative privileges (cannot invite or remove users).
  3. What is RAGFlow?

    main

    RAGFlow is an open-source Retrieval-Augmented Generation (RAG) engine that combines advanced RAG technology with Agent capabilities. It provides a high-trust, production-grade context layer for Large Language Models (LLMs) by transforming complex data into actionable intelligence.

    Key value propositions include:

    • Deep Document Understanding: Extracts insights from complex, unstructured data formats.
    • Template-based Chunking: Offers controllable and explainable text segmentation using various templates.
    • Hallucination Reduction: Provides visual text chunking with manual adjustment support and grounded citations (snapshots of key references) to ensure answers are traceable.
    • Heterogeneous Data Support: Compatible with Word, PPT, Excel, TXT, images, PDF, scanned documents, structured data, and web pages.
    • Automated RAG Workflows: Supports multi-path retrieval and fusion re-ranking, with configurable LLMs and embedding models.
  4. What is the Agent Context Engine?

    main

    The Agent Context Engine is a unified, automated platform designed to replace manual "Context Engineering" with an industrialized process for assembling optimal context for LLMs and AI Agents at inference time. Instead of developers hand-crafting prompt templates and hard-coding retrieval logic, the engine provides a single service layer that dynamically assembles context from three core pillars:

    1. The Knowledge Core (Advanced RAG): Processes static, private enterprise knowledge using advanced techniques like TreeRAG (locate-then-expand retrieval via LLM-generated outlines) and GraphRAG (entity network extraction). It includes an Ingestion Pipeline that acts as an ETL for unstructured data, enriching content with summaries and metadata.
    2. The Memory Layer: A specialized retrieval system for dynamic, episodic data such as conversation history, user preferences, and internal agent states. It manages the lifecycle of data by storing raw dialogue and triggering summarization into semantic memory.
    3. The Tool Orchestrator: Solves the problem of tool selection (especially as toolsets grow via MCP). It uses Tool Retrieval to index tools and Skills (instructions on how/when to use tools), retrieving only the most relevant tools and recipes for a specific task rather than dumping all descriptions into the prompt.
  5. What is Retrieval-Augmented Generation (RAG)?

    main

    Retrieval-Augmented Generation (RAG) is a technique used to solve the limitations of Large Language Models (LLMs), such as static knowledge, inability to access private data, and hallucinations.

    Instead of relying solely on the LLM's internal training data, RAG follows a two-stage process:

    1. Retrieval Stage: The system searches an external knowledge base to find the most relevant documents or data fragments based on the user's query.
    2. Generation Stage: The retrieved information is provided to the LLM as "reference material" (context), which the LLM then uses to generate an accurate, grounded answer.

    This transforms the LLM from "speaking from memory" to "speaking with documentation."

  6. What is RAPTOR and when to use it

    main

    RAPTOR (Recursive Abstractive Processing for Tree Organized Retrieval) is an enhanced document preprocessing technique that builds a hierarchical tree structure of document chunks. It works by recursively clustering chunks based on semantic similarity and summarizing those clusters using a chat model.

    When to use it: Use RAPTOR for multi-hop question-answering tasks that require complex, multi-step reasoning. It helps bridge the semantic gap between a question and its answer by providing the model with both high-level summaries (root nodes) and granular details (leaf nodes).

    Warning: Enabling RAPTOR requires significant memory, computational resources, and tokens because it performs recursive summarization via your chat model.

  7. Overview of DeepDoc Components

    main

    DeepDoc is designed for high-quality document analysis and consists of two main components:

    1. Visual Processing: Includes OCR for text extraction, Layout Recognition for identifying document structures (like headers, figures, and tables), and Table Structure Recognition (TSR) for parsing complex tables into machine-readable formats.
    2. Parser: Provides specialized parsers for PDF, DOCX, EXCEL, and PPT. The PDF parser is the most advanced, outputting text fragments with positional data, cropped images, and tables converted into natural language sentences.
  8. What is Cross-language search in RAGFlow

    main

    Cross-language search (cross-lingual retrieval) allows users to submit queries in one language (e.g., English) and retrieve relevant documents written in different languages (e.g., Chinese or Spanish).

    This is achieved by the system's default chat model, which translates queries to match semantic meaning across languages. This feature helps overcome language barriers and increases the scope of searchable information. It was introduced in version 0.19.0.

  9. Overview of RAGFlow Sandbox deployment modes

    main

    The RAGFlow Sandbox is designed to support multiple deployment modes to allow for different execution environments. Currently, it supports:

    • Self-Managed: On-premise deployment utilizing Daytona or Docker.
    • SaaS providers: Cloud-based sandbox services such as Aliyun Code Interpreter or E2B.

    The architecture is built around a provider-agnostic interface, allowing RAGFlow to interact with different sandbox backends through a unified set of operations while maintaining multi-tenant isolation (mapping one session to one sandbox) and providing unified monitoring.

  10. What is the RAGFlow Admin Service?

    main

    The Admin Service is the core backend management service of RAGFlow. It uses a client-server architecture to provide centralized API interfaces for system administration. It can be controlled via a Web UI or the Admin CLI.

    Core Capabilities:

    • System Monitoring: Real-time monitoring of the RAGFlow server and critical dependencies including MySQL, Elasticsearch, Redis, and MinIO.
    • User Management: In administrator mode, you can view user information, create users, update passwords, modify activation status, and delete user data.
    • Resilience: Administrative functions remain accessible via the Admin CLI even if the Web UI is disabled.
  11. What is an Agent in RAGFlow

    main

    An Agent is RAGFlow's business workflow orchestration capability. It allows users to build complex logic using a no-code canvas by adding components and defining their execution order through connections.

    Agents support various execution patterns:

    • Sequential execution: Components run one after another.
    • Conditional branching: Paths change based on classification results or specific conditions.
    • Loop logic: Repeating certain steps within the workflow.

    Common use cases include:

    • Answering questions using knowledge bases.
    • Intent identification and routing to specific processing flows.
    • Interacting with external systems via HTTP interfaces, databases, MCP tools, or custom code.
    • Processing long texts through splitting and batching.
    • Managing session memory or exporting results.