Files
Easy-Agents/easy-agents-rag/TECH-PLAN.md
陈子默 aa3e90b990 feat: 完成L09统一文档解析模块与MinerU PDF Provider接入
- 新增 easy-agents-document 聚合、document-core 与 document-pdf 模块

- 接入 MinerU PDF provider,支持同步解析、异步任务与 ZIP 结果映射

- 移除 easy-agents-rag-ocr 空壳并补齐 starter 自动装配
2026-04-14 19:57:32 +08:00

96 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# easy-agents-rag 技术规划
## 目标
`easy-agents-rag` 用于承载 Easy-Agents 的 RAG 领域能力,逐步将知识入库、文档预处理、分块、索引增强、检索增强等能力从业务工程中抽离,形成可复用的框架层模块。
当前阶段先完成模块骨架建设,并优先承接本次文档导入链路中的预处理与分块能力迁移。
## 模块规划
### `easy-agents-rag-core`
定位RAG 域共享契约层。
负责内容:
- 通用常量与元数据 key
- 结构类型、策略类型、chunk 类型定义
- 少量稳定共享模型与接口
不负责内容:
- 具体 OCR 实现
- 具体分块实现
- 具体召回编排
### `easy-agents-rag-ingestion`
定位:入库前处理链路。
负责内容:
- 文本标准化与清洗
- 文档结构分析
- 拆分策略推荐
- 文档分块与 chunk 元信息补全
- 入库前质量控制
当前迁移优先承接:
- 文档结构分析
- 章节/问答/段落分块
- 自动推荐拆分策略
### `easy-agents-rag-enhance`
定位:索引前增强能力。
负责内容:
- 图增强
- RAPTOR
- parent-child chunk
- window chunk
- 摘要、关键词、标签等增强信息生成
- 索引前的知识单元增强
### `easy-agents-rag-retrieval`
定位:查询侧增强与召回编排。
负责内容:
- query rewrite / expansion
- hybrid recall 编排
- metadata filter 策略
- graph recall
- rerank 编排
- chunk merge / window expand / context assemble
## 当前迁移范围
本次优先迁移到 `easy-agents-rag-ingestion` 的能力:
- 文档结构分析
- 拆分策略推荐
- 标题型 / QA 型 / 段落型分块
本次不迁移的能力:
- 业务侧预览会话
- 控制器与接口 DTO
- 业务库持久化
- 前端导入页面
- OCR / PDF 解析能力
这些能力继续留在业务工程,由业务层依赖 `easy-agents-rag` 提供的能力完成编排。
其中 OCR / PDF 解析能力改由独立的 `easy-agents-document` 能力域承接,不再归属 `easy-agents-rag`
## 后续演进
后续演进顺序建议如下:
1. 完成 `rag-ingestion` 首批能力迁移并稳定对外接口
2. 补充 `rag-enhance`支持图增强、RAPTOR、索引增强
3. 补充 `rag-retrieval`,统一查询增强与召回后处理
整体原则:
- `easy-agents-core` 保持基础抽象
- `easy-agents-rag` 聚合 RAG 领域实现
- `easy-agents-document` 承接 OCR、版面理解与 PDF 解析等文档处理能力
- 业务工程只保留编排、持久化与产品层逻辑