Files
rag/docs/OPTIMIZATION_PROGRESS.md
lacerate551 100d1a06eb init: RAG 知识库服务初始提交
- 后端 API(Flask + Gunicorn)
- RAG 引擎(混合检索 + 云端 Reranker + 引用溯源)
- 文档解析(MinerU + 多格式支持)
- Docker 生产部署配置
- 排除前端项目、敏感配置、模型文件
2026-06-04 17:35:27 +08:00

51 lines
1.3 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.
# 代码优化进度记录
**日期**: 2026-05-17
**最后更新**: 12:45
---
## 已完成工作
### 阶段1-3: 异常处理规范化 ✅
- 全项目裸异常已清零19处修复
- 提交: `0d86bdd`
### P0: print→logging迁移 ✅ (90%完成)
- 提交: `d198200`, `6a9bc9b`
- 业务代码全部迁移残留print均在测试块/CLI交互中
### P1: LLM调用统一 ✅
- 提交: `5645c79`
- 31处直接LLM调用统一到 `core/llm_utils.py`
**迁移模块**:
| 模块 | 文件 | 调用数 |
|------|------|--------|
| core/ | agentic.py | 9 |
| core/ | engine.py | 2 |
| core/ | intent_analyzer.py | 1 |
| core/ | quality_assessor.py | 1 |
| core/ | query_decomposer.py | 1 |
| core/ | reasoning_reflector.py | 1 |
| exam_pkg/ | generator.py | 2 |
| exam_pkg/ | grader.py | 1 |
| api/ | chat_routes.py | 2 |
| services/ | feedback.py | 2 |
| services/ | outline.py | 1 |
| graph/ | graph_build.py | 1 |
| graph/ | graph_rag.py | 2 |
| graph/ | entity_extractor.py | 1 |
| knowledge/ | manager.py | 2 |
| knowledge/ | router.py | 1 |
---
## 后续优化建议
| 优先级 | 角度 | 说明 |
|--------|------|------|
| P2 | 大文件拆分 | agentic.py(3526行), manager.py(3106行) |
| P3 | 类型注解补全 | 提升IDE支持和静态检查 |
| P4 | 性能热点优化 | BM25持久化、reranker批处理 |