feat(asl): Complete Deep Research V2.0 core development
Backend: - Add SSE streaming client (unifuncsSseClient) replacing async polling - Add paragraph-based reasoning parser with mergeConsecutiveThinking - Add requirement expansion service (DeepSeek-V3 PICOS+MeSH) - Add Word export service with Pandoc, inline hyperlinks, reference link expansion - Add deep research V2 worker with 2s log flush and Chinese source prompt - Add 5 curated data sources config (PubMed/ClinicalTrials/Cochrane/CNKI/MedJournals) - Add 4 API endpoints (generate-requirement/tasks/task-status/export-word) - Update Prisma schema with 6 new V2.0 fields on AslResearchTask - Add DB migration for V2.0 fields - Simplify ASL_DEEP_RESEARCH_EXPANSION prompt (remove strategy section) Frontend: - Add waterfall-flow DeepResearchPage (phase 0-4 progressive reveal) - Add LandingView, SetupPanel, StrategyConfirm, AgentTerminal, ResultsView - Add react-markdown + remark-gfm for report rendering - Add custom link component showing visible URLs after references - Add useDeepResearchTask polling hook - Add deep research TypeScript types Tests: - Add E2E test, smoke test, and Chinese data source test scripts Docs: - Update ASL module status (v2.0 - core features complete) - Update system status (v6.1 - ASL V2.0 milestone) - Update Unifuncs DeepSearch API guide (v2.0 - SSE mode + Chinese source results) - Update module auth specification (test script guidelines) - Update V2.0 development plan Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -55,7 +55,7 @@ const RVW_FALLBACKS: Record<string, FallbackPrompt> = {
|
||||
};
|
||||
|
||||
/**
|
||||
* ASL 模块兜底 Prompt(预留)
|
||||
* ASL 模块兜底 Prompt
|
||||
*/
|
||||
const ASL_FALLBACKS: Record<string, FallbackPrompt> = {
|
||||
ASL_SCREENING: {
|
||||
@@ -64,6 +64,49 @@ const ASL_FALLBACKS: Record<string, FallbackPrompt> = {
|
||||
请根据提供的标准对文献进行筛选,输出JSON格式的结果。`,
|
||||
modelConfig: { model: 'deepseek-v3', temperature: 0.2 },
|
||||
},
|
||||
|
||||
ASL_DEEP_RESEARCH_EXPANSION: {
|
||||
content: `你是一位经验丰富的医学信息官,擅长将研究者的模糊想法转化为精准的文献检索需求指令。
|
||||
|
||||
## 任务
|
||||
根据用户输入的粗略研究想法,生成一份简洁的深度文献检索指令书。
|
||||
|
||||
## 输出规则
|
||||
1. 自然语言风格:像写邮件一样,口语化但专业,方便研究者直接阅读和编辑
|
||||
2. PICOS 拆解:明确 Population / Intervention / Comparison / Outcome / Study Design
|
||||
3. MeSH 扩展:为关键术语补充 MeSH 同义词(用括号标注英文 MeSH 术语)
|
||||
4. 研究设计偏好:若用户未指定,默认优先 RCT、Systematic Review/Meta-Analysis、Cohort Study
|
||||
5. 不要输出"检索策略建议"章节
|
||||
6. 不要使用 Markdown 加粗标记(即不要用 ** 符号)
|
||||
7. 不得自行添加约束:不要擅自限定"仅开放获取"或"仅英文文献"
|
||||
|
||||
## 用户输入
|
||||
- 研究想法:{{originalQuery}}
|
||||
- 选择的数据源:{{targetSources}}
|
||||
- 时间范围:{{yearRange}}
|
||||
- 目标数量:{{targetCount}}
|
||||
|
||||
## 输出格式
|
||||
请严格按以下两部分输出,不要添加额外内容:
|
||||
|
||||
### Part 1: 自然语言检索指令书
|
||||
(简洁的检索需求描述,包含研究背景、PICOS要素、MeSH术语,不要包含检索策略建议)
|
||||
|
||||
### Part 2: 结构化摘要(JSON)
|
||||
\`\`\`json
|
||||
{
|
||||
"objective": "研究目标一句话描述",
|
||||
"population": "研究人群",
|
||||
"intervention": "干预措施(含英文MeSH)",
|
||||
"comparison": "对照组",
|
||||
"outcome": "主要结局指标",
|
||||
"studyDesign": ["RCT", "Meta-analysis"],
|
||||
"meshTerms": ["MeSH术语1", "MeSH术语2"],
|
||||
"condition": "疾病/状况"
|
||||
}
|
||||
\`\`\``,
|
||||
modelConfig: { model: 'deepseek-v3', temperature: 0.4 },
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user