Files
AIclinicalresearch/docs/_templates/README.md
HaHafeng beb7f7f559 feat(asl): Implement full-text screening core LLM service and validation system (Day 1-3)
Core Components:
- PDFStorageService with Dify/OSS adapters
- LLM12FieldsService with Nougat-first + dual-model + 3-layer JSON parsing
- PromptBuilder for dynamic prompt assembly
- MedicalLogicValidator with 5 rules + fault tolerance
- EvidenceChainValidator for citation integrity
- ConflictDetectionService for dual-model comparison

Prompt Engineering:
- System Prompt (6601 chars, Section-Aware strategy)
- User Prompt template (PICOS context injection)
- JSON Schema (12 fields constraints)
- Cochrane standards (not loaded in MVP)

Key Innovations:
- 3-layer JSON parsing (JSON.parse + json-repair + code block extraction)
- Promise.allSettled for dual-model fault tolerance
- safeGetFieldValue for robust field extraction
- Mixed CN/EN token calculation

Integration Tests:
- integration-test.ts (full test)
- quick-test.ts (quick test)
- cached-result-test.ts (fault tolerance test)

Documentation Updates:
- Development record (Day 2-3 summary)
- Quality assurance strategy (full-text screening)
- Development plan (progress update)
- Module status (v1.1 update)
- Technical debt (10 new items)

Test Results:
- JSON parsing success rate: 100%
- Medical logic validation: 5/5 passed
- Dual-model parallel processing: OK
- Cost per PDF: CNY 0.10

Files: 238 changed, 14383 insertions(+), 32 deletions(-)
Docs: docs/03-涓氬姟妯″潡/ASL-AI鏅鸿兘鏂囩尞/05-寮€鍙戣褰?2025-11-22_Day2-Day3_LLM鏈嶅姟涓庨獙璇佺郴缁熷紑鍙?md
2025-11-22 22:21:12 +08:00

1.5 KiB
Raw Blame History

文档模板

目录说明: 本目录包含各类文档的标准模板
使用方法: 创建新文档时,复制对应模板,填充内容


📋 模板清单

模板 说明 适用场景
[AI对接] 快速上下文-模板.md 快速上下文文档模板 创建新模块/能力时
模块README-模板.md 模块README模板 创建新业务模块时

🎯 使用说明

1. 创建新业务模块

步骤:

  1. 复制 模块README-模板.md 到新模块目录
  2. 重命名为 README.md
  3. 填充所有 [占位符] 内容
  4. 删除不需要的章节

2. 创建快速上下文文档

步骤:

  1. 复制 [AI对接] 快速上下文-模板.md 到对应目录
  2. 重命名为 [AI对接] [模块代号]快速上下文.md
  3. 填充所有内容
  4. 确保Token消耗在目标范围内

📏 模板规范

快速上下文文档规范

L0级别总体

  • Token消耗~800
  • 阅读时间2分钟
  • 内容:项目全貌、快速跳转

L1级别层级

  • Token消耗~1500
  • 阅读时间3分钟
  • 内容:层级概览、模块清单

L2级别模块

  • Token消耗~2000
  • 阅读时间5分钟
  • 内容:模块详情、开发指南

🔗 相关文档


最后更新: 2025-11-06
维护人: 技术架构师