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
This commit is contained in:
1
docs/_templates/API设计-模板.md
vendored
1
docs/_templates/API设计-模板.md
vendored
@@ -480,5 +480,6 @@ curl -X POST "http://localhost:3001/api/v1/xxx/resources" \
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1
docs/_templates/README.md
vendored
1
docs/_templates/README.md
vendored
@@ -84,5 +84,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1
docs/_templates/[AI对接] 快速上下文-模板.md
vendored
1
docs/_templates/[AI对接] 快速上下文-模板.md
vendored
@@ -185,5 +185,6 @@ POST /api/v1/[module]/[resource2]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1
docs/_templates/数据库设计-模板.md
vendored
1
docs/_templates/数据库设计-模板.md
vendored
@@ -225,5 +225,6 @@ INSERT INTO xxx_schema.xxx_table_name (field_name, status) VALUES
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1
docs/_templates/模块README-模板.md
vendored
1
docs/_templates/模块README-模板.md
vendored
@@ -92,5 +92,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user