GEO

OpenRAG是什么?2026年开源RAG框架深度解析与实验指南

2026/3/13
OpenRAG是什么?2026年开源RAG框架深度解析与实验指南
AI Summary (BLUF)

OpenRag is a lightweight, modular, and extensible open-source RAG framework designed for experimentation with advanced retrieval-augmented generation techniques, featuring rich file format support, web-based UI, and distributed deployment capabilities.

原文翻译: OpenRag是一个轻量级、模块化且可扩展的开源RAG框架,专为实验先进的检索增强生成技术而设计,具有丰富的文件格式支持、基于Web的用户界面和分布式部署能力。

概述

OpenRAG 是一个轻量级、模块化且可扩展的检索增强生成框架,专为探索和测试先进的 RAG 技术而设计。它 100% 开源,核心聚焦于实验与创新,而非供应商锁定。

OpenRAG 是一个轻量级、模块化且可扩展的检索增强生成框架,专为探索和测试先进的 RAG 技术而设计。它 100% 开源,核心聚焦于实验与创新,而非供应商锁定。

由 Linagora 构建的 OpenRAG,旨在提供一个“设计即主权”的替代方案,以区别于主流的 RAG 技术栈。

Built by Linagora, OpenRAG offers a sovereign-by-design alternative to mainstream RAG stacks.

核心目标

OpenRAG 项目旨在实现以下关键目标:

The OpenRAG project aims to achieve the following key objectives:

  • 实验先进的 RAG 技术:提供一个灵活的平台来测试和验证最新的检索与生成方法。
  • 开发 RAG 应用评估指标:建立一套标准化的评估体系,以量化 RAG 系统的性能与效果。
  • 与社区协作创新:携手开源社区,共同推动 RAG 应用技术的边界。
  • Experiment with advanced RAG techniques: Provide a flexible platform to test and validate the latest retrieval and generation methods.
  • Develop evaluation metrics for RAG applications: Establish a standardized evaluation system to quantify the performance and effectiveness of RAG systems.
  • Collaborate with the community to innovate: Work with the open-source community to collectively push the boundaries of RAG application technology.

主要特性

📁 丰富的文件格式支持

OpenRAG 支持广泛的文件格式,以实现无缝的文档摄取:

OpenRAG supports a comprehensive range of file formats for seamless document ingestion:

  • 文本文件txt, md
  • 文档文件pdf, docx, doc, pptx - 支持带 OCR 的高级 PDF 解析和 Office 文档处理
  • 音频文件wav, mp3, mp4, ogg, flv, wma, aac - 音频转录和内容提取
  • 图像文件png, jpeg, jpg, svg - 基于视觉语言模型的图像描述与分析
  • Text Files: txt, md
  • Document Files: pdf, docx, doc, pptx - Advanced PDF parsing with OCR support and Office document processing
  • Audio Files: wav, mp3, mp4, ogg, flv, wma, aac - Audio transcription and content extraction
  • Images: png, jpeg, jpg, svg - Vision Language Model (VLM) powered image captioning and analysis

所有文件都会被智能地转换为 Markdown 格式,图像则由 AI 生成的描述替代,确保了跨所有文档类型的一致处理流程。

All files are intelligently converted to Markdown format with images replaced by AI-generated captions, ensuring consistent processing across all document types.

🎛️ 原生基于 Web 的索引器界面

通过内置的 Web 界面体验直观的文档管理。

Experience intuitive document management through our built-in web interface.

索引器 UI 功能包括:

  • 拖放文件上传,支持批量处理
  • 实时索引进度监控与状态更新
  • 管理仪表板,用于监控 RAG 组件(索引器、向量数据库、任务状态管理器等)
  • 分区管理 - 将文档组织到逻辑集合中
  • 可视化文档预览和元数据检查
  • 对已索引内容的搜索和过滤功能

Indexer UI Features:

  • Drag-and-drop file upload with batch processing capabilities
  • Real-time indexing progress monitoring and status updates
  • Admin Dashboard to monitor RAG components (Indexer, VectorDB, TaskStateManager, etc.)
  • Partition management - organize documents into logical collections
  • Visual document preview and metadata inspection
  • Search and filtering capabilities for indexed content

💬 带来源追溯的交互式聊天界面

通过我们精致的聊天界面与您的文档进行交互:

Engage with your documents through our sophisticated chat interface:

聊天 UI 功能:

  • 基于 Chainlit 的 UI - 现代化、响应式的聊天体验
  • 来源透明化 - 每个回答都包含相关的文档引用

Chat UI Features:

  • Chainlit-powered UI - modern, responsive chat experience
  • Source transparency - every response includes relevant document references

🔌 OpenAI API 兼容性

OpenRAG 的 API 专门设计为与 OpenAI 格式兼容,这使得您可以将部署的 RAG 无缝集成到流行的前端和工作流中,例如 OpenWebUI、LangChain、N8N 等。这确保了灵活性,并降低了采用门槛,无需自定义适配器。

The OpenRAG API is tailored to be compatible with the OpenAI format, enabling seamless integration of your deployed RAG into popular frontends and workflows such as OpenWebUI, LangChain, N8N, and more. This ensures flexibility and ease of adoption without requiring custom adapters.

功能摘要:

  • 即插即用替代 OpenAI API 端点
  • 兼容流行前端,如 OpenWebUI、LangChain、N8N 等
  • 认证支持 - 使用基于令牌的认证保护您的 API

Summary of features:

  • Drop-in replacement for OpenAI API endpoints
  • Compatible with popular frontends like OpenWebUI, LangChain, N8N, and more
  • Authentication support - secure your API with token-based auth

⚡ 分布式 Ray 部署

将您的 RAG 流水线扩展到多台机器和多个 GPU 上。

Scale your RAG pipeline across multiple machines and GPUs.

分布式 Ray 部署:

  • 水平扩展 - 将处理任务分布到工作节点
  • GPU 加速 - 跨可用硬件优化推理性能
  • 资源管理 - 智能分配计算资源
  • 监控仪表板 - 实时集群健康状态与性能指标

Distributed Ray Deployment:

  • Horizontal scaling - distribute processing across worker nodes
  • GPU acceleration - optimize inference across available hardware
  • Resource management - intelligent allocation of compute resources
  • Monitoring dashboard - real-time cluster health and performance metrics

🔍 高级检索与重排序

OpenRAG 利用最先进的检索技术以实现卓越的准确性。

OpenRAG leverages state-of-the-art retrieval techniques for superior accuracy.

已实现的高级检索技术:

  • 混合搜索 - 结合语义相似性与 BM25 关键词匹配
  • 上下文检索 - Anthropic 的增强文本块相关性技术
  • 多语言重排序 - 使用 Alibaba-NLP/gte-multilingual-reranker-base 模型

Implemented advanced retrieval techniques:

  • Hybrid search - combines semantic similarity with BM25 keyword matching
  • Contextual retrieval - Anthropic's technique for enhanced chunk relevance
  • Multilingual reranking - using Alibaba-NLP/gte-multilingual-reranker-base

安装与快速开始

先决条件

  • Python 3.12 或更高版本(推荐)
  • DockerDocker Compose
  • 对于支持 GPU 的机器,请确保已安装 NVIDIA Container Toolkit。请参考 NVIDIA 文档 获取安装指南。
  • Python 3.12 or higher recommended
  • Docker and Docker Compose
  • For GPU capable machines, ensure you have the NVIDIA Container Toolkit installed. Refer to the NVIDIA documentation for installation instructions.

安装与配置步骤

1. 克隆仓库

git clone --recurse-submodules git@github.com:linagora/openrag.git
cd openrag
git checkout main # 或切换到指定发布版本

2. 创建 .env 文件

在项目根目录创建 .env 文件,参照 .env.example 的结构,以配置您的环境并填充必要的环境变量。

Create a .env file at the root of the project, mirroring the structure of .env.example, to configure your environment and supply necessary environment variables.

cp .env.example .env

3. 文件解析器配置

所有支持的文件格式解析器均已预配置。对于 PDF 处理,MarkerLoader 作为默认解析器,为 OCR 扫描文档、复杂布局、表格和嵌入式图像提供全面支持。MarkerLoader 在 GPU 和 CPU 环境下都能高效运行。

All supported file format parsers are pre-configured. For PDF processing, MarkerLoader serves as the default parser, offering comprehensive support for OCR-scanned documents, complex layouts, tables, and embedded images. MarkerLoader operates efficiently on both GPU and CPU environments.

更多 PDF 选项:对于仅 CPU 的部署或轻量级测试场景,您可以考虑切换到 PyMuPDF4LLMLoaderPyMuPDFLoader。要更改加载器,请像这样设置 PDFLoader 变量:PDFLoader=PyMuPDF4LLMLoader

For more PDF options: For CPU-only deployments or lightweight testing scenarios, you can consider switching to PyMuPDF4LLMLoader or PyMuPDFLoader. To change the loader, set the PDFLoader variable like this: PDFLoader=PyMuPDF4LLMLoader.

⚠️ 重要提示:这些替代加载器存在限制——它们无法处理不可搜索的(基于图像的)PDF,并且不提取或处理嵌入式图像。

⚠️ Important: These alternative loaders have limitations - they cannot process non-searchable (image-based) PDFs and do not extract or handle embedded images.

4. 部署:启动应用

重要提示:如果您的 .env 文件中尚未配置 Indexer UI(一个用于直观文档摄取、索引和管理的 Web 界面),请遵循此专用指南:➡ 使用 Indexer UI 部署

Important: In case Indexer UI (A Web interface for intuitive document ingestion, indexing, and management.) is not configured already in your .env, follow this dedicated guide: ➡ Deploy with Indexer UI.

  • 简单快速的测试启动
  • Simple and quick launch for testing

[!IMPORTANT] 对于仅使用 docker-compose 文件的 简单快速部署,只需要 quick_start 文件夹。请按照以下步骤启动应用:

[!IMPORTANT] For a simple quick deployment using only the docker-compose file, only the quick_start folder is required. Follow these steps to launch the application:

  1. 导航到 quick_start 目录或仅下载该文件夹。
  2. 将您的 .env 文件放入 quick_start 目录内。
  3. 根据您的系统运行相应的命令:
  1. Navigate to the quick_start directory or download only that folder.
  2. Place your .env file inside the quick_start directory.
  3. Run the appropriate command for your system:
# GPU 部署(推荐以获得最佳性能)
docker compose up -d
# docker compose down # 停止应用

# CPU 部署
docker compose --profile cpu up -d
# docker compose --profile cpu down # 停止应用

应用启动并运行后,访问 http://localhost:APP_PORThttp:X.X.X.X:APP_PORT 可通过以下方式访问:

Once the app is up and running, visit http://localhost:APP_PORT or http:X.X.X.X:APP_PORT to access via:

  1. /docs – FastAPI 的完整 API 文档。
  2. /chainlitChainlit 聊天界面,用于与您的分区聊天。要禁用它(例如,仅用于后端),请设置 WITH_CHAINLIT_UI=False
  3. http://localhost:INDEXERUI_PORT – 访问索引器 UI,以便轻松进行文档摄取、索引和管理。
  1. /docs – FastAPI’s full API documentation.
  2. /chainlitChainlit chat UI to chat with your partitions. To disable it (e.g., for backend-only use), set WITH_CHAINLIT_UI=False.
  3. http://localhost:INDEXERUI_PORT – to access the indexer UI for easy document ingestion, indexing, and management.

总结与展望

OpenRAG 作为一个专注于实验和社区驱动的开源 RAG 框架,通过其模块化设计、丰富的功能集和对开放标准的兼容性,为开发者和研究者提供了一个强大的工具。其“设计即主权”的理念强调了数据控制和技术自主权的重要性。

OpenRAG, as an open-source RAG framework focused on experimentation and community-driven development, provides a powerful tool for developers and researchers through its modular design, rich feature set, and compatibility with open standards. Its "sovereign-by-design" philosophy emphasizes the importance of data control and technological autonomy.

随着未来对更多文件格式、高级代理功能和安全增强的支持,OpenRAG 有望在快速发展的 RAG 生态系统中扮演越来越重要的角色。对于任何希望深入探索、定制化构建或研究检索增强生成技术的人来说,OpenRAG 都是一个值得关注的起点。

With future support for more file formats, advanced agentic features, and security enhancements, OpenRAG is poised to play an increasingly important role in the rapidly evolving RAG ecosystem. For anyone looking to deeply explore, custom-build, or research retrieval-augmented generation technology, OpenRAG is a noteworthy starting point.

常见问题(FAQ)

OpenRAG支持哪些文件格式?

OpenRAG支持广泛的格式,包括文本(txt, md)、文档(pdf, docx等)、音频(mp3, wav等)和图像(png, jpg等)。所有文件会被智能转换为Markdown格式进行处理。

OpenRAG如何实现与现有工具的集成?

OpenRAG提供与OpenAI API兼容的接口,可作为即插即用替代方案,轻松集成到OpenWebUI、LangChain、N8N等流行前端和工作流中,无需自定义适配器。

OpenRAG的Web界面有哪些功能?

提供原生Web索引器界面,支持拖放上传、实时进度监控、分区管理、文档预览和搜索。聊天界面基于Chainlit,具备来源追溯功能,每个回答都包含相关文档引用。

← 返回文章列表
分享到:微博

版权与免责声明:本文仅用于信息分享与交流,不构成任何形式的法律、投资、医疗或其他专业建议,也不构成对任何结果的承诺或保证。

文中提及的商标、品牌、Logo、产品名称及相关图片/素材,其权利归各自合法权利人所有。本站内容可能基于公开资料整理,亦可能使用 AI 辅助生成或润色;我们尽力确保准确与合规,但不保证完整性、时效性与适用性,请读者自行甄别并以官方信息为准。

若本文内容或素材涉嫌侵权、隐私不当或存在错误,请相关权利人/当事人联系本站,我们将及时核实并采取删除、修正或下架等处理措施。 也请勿在评论或联系信息中提交身份证号、手机号、住址等个人敏感信息。