RA

RAGFlow

⭐ 30,000•Python•RAG Framework

Open-source deep RAG knowledge engine with layout-aware document parsing and visual workflow designer.

PythonRAGKnowledge BaseDocument ParsingEnterpriseOpen SourceMulti-Tenant

Overview

RAGFlow is an open-source deep RAG knowledge engine by InfiniFlow, providing a full-stack, production-ready pipeline for enterprise knowledge bases. With 30,000+ GitHub stars, RAGFlow's key differentiator is deep document parsing using layout-aware models like LayoutLMv3 to extract structured content from complex documents — tables, figures, multi-column layouts, and scanned PDFs. The framework supports multi-tenant deployment with RBAC, integrates with Milvus/Elasticsearch/Weaviate/Chroma, and supports all major LLM providers including OpenAI, Anthropic, DeepSeek, and local models via Ollama. A visual drag-and-drop workflow designer allows building RAG pipelines without code.

Features

  • ✓Layout-aware deep document parsing with LayoutLMv3
  • ✓Visual drag-and-drop workflow designer
  • ✓Multi-tenant architecture with RBAC and audit logging
  • ✓Multi-vector-database support: Milvus, Elasticsearch, Weaviate, Chroma, PgVector
  • ✓Multi-LLM provider: OpenAI, Anthropic, DeepSeek, Dify, Ollama
  • ✓Template library for PDF, DOCX, XLSX, PPTX, Markdown, HTML, email
  • ✓Hybrid search: vector + BM25 with configurable fusion
  • ✓Citation and traceability with page-level source links
  • ✓RESTful API for programmatic integration
  • ✓Docker Compose one-command deployment

Installation

git clone https://github.com/infiniflow/ragflow.git && cd ragflow && docker compose up -d

Pros

  • +Excellent document parsing quality with deep layout analysis
  • +Enterprise-ready with multi-tenant and RBAC
  • +Open source under Apache 2.0 license
  • +Visual workflow designer for non-coder teams
  • +Large active community with 30K+ GitHub stars
  • +One-command Docker deployment

Cons

  • −Resource-intensive: GPU recommended for deep parsing models
  • −Docker-only deployment model
  • −Learning curve for advanced workflow configurations
  • −Primarily Python ecosystem
  • −No built-in streaming API for real-time responses

Alternatives

Documentation

RAGFlow

Overview

RAGFlow is an open-source deep RAG (Retrieval-Augmented Generation) knowledge engine that provides a full-stack, production-ready pipeline for enterprise knowledge bases. The project has surged past 30,000 GitHub stars, becoming one of the most popular open-source RAG frameworks.

RAGFlow's key differentiator is its approach to document parsing. Rather than treating all documents uniformly, it applies layout-aware parsing using models like LayoutLMv3 to extract structured content from complex documents — tables, figures, multi-column layouts, and scanned documents. This "deep parsing" approach significantly improves retrieval quality compared to naive chunking.

The framework is designed for enterprise deployment: it supports multi-tenant architecture, RBAC, audit logging, and integrates with popular vector databases (Milvus, Elasticsearch, Weaviate, Chroma) and LLM providers (OpenAI, Anthropic, DeepSeek, Dify, Ollama, local models).

Features

  • Deep document parsing: Layout-aware parsing with LayoutLMv3 for tables, figures, and complex layouts
  • Multi-tenant architecture: Enterprise-ready with RBAC and audit logging
  • Visual workflow designer: Drag-and-drop interface for building RAG pipelines
  • Knowledge base management: Document upload, parsing, chunking, and indexing in one platform
  • Multi-vector-database support: Milvus, Elasticsearch, Weaviate, Chroma, PgVector
  • Multi-LLM provider: OpenAI, Anthropic, DeepSeek, Dify, Ollama, local models
  • Template library: Pre-built templates for common document types (PDF, Word, Excel, Markdown, HTML, email)
  • API-first: RESTful API for programmatic integration
  • Docker Compose deployment: One-command setup for local and production environments

Installation

# Quick start with Docker Compose
git clone https://github.com/infiniflow/ragflow.git
cd ragflow
cp .env.example .env
docker compose up -d

# Access the web UI at http://localhost:9380
# Alternatively via pip for development
pip install ragflow

Quick Start

from ragflow import RAGFlow

# Initialize
ragflow = RAGFlow(
    api_key="your-api-key",
    base_url="http://localhost:9380/api/v1"
)

# Create a knowledge base
kb = ragflow.create_knowledge_base(
    name="product-docs",
    description="Product documentation for RAG",
    parser_id="naive"
)

# Upload documents
kb.upload_documents("path/to/docs/")

# Query
response = ragflow.query(
    knowledge_base_id=kb.id,
    question="How do I deploy RAGFlow in production?",
    top_k=5
)
for chunk in response.chunks:
    print(f"Source: {chunk.source} | Content: {chunk.content}")

Core Concepts

Deep Parsing

RAGFlow's deep parsing pipeline uses a multi-stage approach:

  1. Document recognition: Classify document type (PDF, image, scanned)
  2. Layout analysis: Detect layout elements (text blocks, tables, figures, headers) using LayoutLMv3
  3. Content extraction: Extract text, tables (as structured data), and image descriptions
  4. Chunking: Apply document-aware chunking strategies (semantic, fixed, or hybrid)
  5. Embedding: Generate vector embeddings for each chunk

Visual Workflow Designer

The drag-and-drop interface allows building custom RAG pipelines without code:

  • Data source → Parsing → Chunking → Embedding → Indexing → Query → Response Generation
  • Each step is configurable and can be combined with custom logic

Knowledge Base Management

  • Multi-format support: PDF, DOCX, XLSX, PPTX, Markdown, HTML, email, images
  • Incremental indexing for updated documents
  • Version tracking for document updates
  • Permission-based access control per knowledge base

Advanced Features

Hybrid Search

Combines vector similarity search with keyword-based BM25 search for higher recall. Configurable fusion strategy (weighted sum, RRF, or learned reranking).

Multi-Round Dialogue

Maintains conversation context across turns, enabling follow-up questions and clarification without repeating context.

Citation & Traceability

Every generated answer includes exact source citations with page numbers and document links, enabling auditability and verification.

Reranking

Post-retrieval reranking with cross-encoder models (BGE-Reranker, Cohere Rerank) for precision tuning.

Pros

  • ✅ Excellent document parsing quality (deep parsing)
  • ✅ Enterprise-ready (multi-tenant, RBAC, audit)
  • ✅ Open source under Apache 2.0
  • ✅ Visual workflow designer for non-coders
  • ✅ Multi-provider LLM support
  • ✅ Large, active community (30K+ stars)
  • ✅ One-command Docker deployment

Cons

  • ❌ Resource-intensive (requires GPU for deep parsing models)
  • ❌ Docker-only deployment (no native bare-metal install)
  • ❌ Learning curve for advanced configurations
  • ❌ Primarily Python ecosystem
  • ❌ No built-in streaming API for real-time responses

When to Use

  • Building enterprise knowledge bases with complex documents
  • Needing high-quality document parsing without building custom pipelines
  • Deploying RAG at scale with multi-tenant support
  • Teams wanting visual workflow design alongside code
  • Organizations standardizing on open-source RAG infrastructure

Resources