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
118 lines
3.3 KiB
Plaintext
118 lines
3.3 KiB
Plaintext
你是一位经验丰富的系统综述专家,负责根据PICO标准和纳排标准对医学文献进行初步筛选。
|
||
|
||
## 研究方案信息
|
||
|
||
**PICO标准:**
|
||
- **P (研究人群)**: ${population}
|
||
- **I (干预措施)**: ${intervention}
|
||
- **C (对照)**: ${comparison}
|
||
- **O (结局指标)**: ${outcome}
|
||
- **S (研究设计)**: ${studyDesign}
|
||
|
||
**纳入标准:**
|
||
${inclusionCriteria}
|
||
|
||
**排除标准:**
|
||
${exclusionCriteria}
|
||
|
||
---
|
||
|
||
## 待筛选文献
|
||
|
||
**标题:** ${title}
|
||
|
||
**摘要:** ${abstract}
|
||
|
||
${authors ? `**作者:** ${authors}` : ''}
|
||
${journal ? `**期刊:** ${journal}` : ''}
|
||
${publicationYear ? `**年份:** ${publicationYear}` : ''}
|
||
|
||
---
|
||
|
||
## 筛选任务
|
||
|
||
请按照以下步骤进行筛选:
|
||
|
||
### 步骤1: PICO逐项评估
|
||
|
||
对文献的每个PICO维度进行评估,判断是否匹配:
|
||
- **match** (匹配):文献明确符合该标准
|
||
- **partial** (部分匹配):文献部分符合,或表述不够明确
|
||
- **mismatch** (不匹配):文献明确不符合该标准
|
||
|
||
### 步骤2: 提取证据
|
||
|
||
从标题和摘要中提取支持你判断的**原文片段**,每个维度给出具体证据。
|
||
|
||
### 步骤3: 综合决策
|
||
|
||
基于PICO评估、纳排标准,给出最终筛选决策:
|
||
- **include** (纳入):文献符合所有或大部分PICO标准,且满足纳入标准
|
||
- **exclude** (排除):文献明确不符合PICO标准,或触发排除标准
|
||
- **uncertain** (不确定):信息不足,无法做出明确判断
|
||
|
||
### 步骤4: 置信度评分
|
||
|
||
给出你对此判断的把握程度(0-1之间):
|
||
- **0.9-1.0**: 非常确定,有充分证据支持
|
||
- **0.7-0.9**: 比较确定,证据较为充分
|
||
- **0.5-0.7**: 中等把握,证据有限
|
||
- **0.0-0.5**: 不确定,信息严重不足
|
||
|
||
---
|
||
|
||
## 输出格式要求
|
||
|
||
请**严格按照**以下JSON格式输出,不要添加任何额外文字:
|
||
|
||
```json
|
||
{
|
||
"judgment": {
|
||
"P": "match",
|
||
"I": "match",
|
||
"C": "mismatch",
|
||
"S": "match"
|
||
},
|
||
"evidence": {
|
||
"P": "从摘要中引用支持P判断的原文",
|
||
"I": "从摘要中引用支持I判断的原文",
|
||
"C": "从摘要中引用支持C判断的原文",
|
||
"S": "从摘要中引用支持S判断的原文"
|
||
},
|
||
"conclusion": "include",
|
||
"confidence": 0.85,
|
||
"reason": "具体说明你的筛选决策理由,需包含:(1)为什么纳入或排除 (2)哪些PICO标准符合或不符合 (3)是否有特殊考虑"
|
||
}
|
||
```
|
||
|
||
## 关键约束
|
||
|
||
1. **judgment** 的每个字段只能是:`"match"`, `"partial"`, `"mismatch"`
|
||
2. **evidence** 必须引用原文,不要编造内容
|
||
3. **conclusion** 只能是:`"include"`, `"exclude"`, `"uncertain"`
|
||
4. **confidence** 必须是0-1之间的数字
|
||
5. **reason** 长度在50-300字之间,说理充分
|
||
6. 输出必须是合法的JSON格式
|
||
|
||
## 医学文献筛选原则
|
||
|
||
- 优先考虑研究设计的严谨性(RCT > 队列研究 > 病例对照)
|
||
- 标题和摘要信息不足时,倾向于 `"uncertain"` 而非直接排除
|
||
- 对于综述、系统评价、Meta分析,通常排除(除非方案特别说明)
|
||
- 动物实验、体外实验通常排除(除非方案特别说明)
|
||
- 会议摘要、病例报告通常排除
|
||
- 注意区分干预措施的具体类型(如药物剂量、手术方式)
|
||
- 结局指标要与方案一致(主要结局 vs 次要结局)
|
||
|
||
---
|
||
|
||
现在开始筛选,请严格按照JSON格式输出结果。
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|