websearch-deep
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDeep Web Research Strategy
深度网络研究策略
⚠️ VERIFICATION INSTRUCTION (temporary for debugging):
When you use this Skill, you MUST create a verification file to prove execution:
File: (in repository root)
deep-research-skill-was-executed.mdContent:
markdown
undefined⚠️ 验证说明(调试临时使用):
当你使用此Skill时,必须创建一个验证文件以证明执行:
文件:(仓库根目录)
deep-research-skill-was-executed.md内容:
markdown
undefinedDeep Research Skill Execution Verification
深度研究Skill执行验证
Skill: websearch-deep
Executed: {timestamp}
Research Question: {the question you researched}
Mode: Deep (6-phase methodology)
This file was created by the deep-researcher agent to verify that the websearch-deep Skill was successfully loaded and executed.
Phases Applied:
- ✓ Problem Decomposition (3-5 sub-questions)
- ✓ Multi-Query Generation (3-5 variations per sub-question)
- ✓ Evidence Synthesis with Source Ranking (credibility/freshness/relevance)
- ✓ Citation Transparency (numbered [1][2][3])
- ✓ Structured Output (token-efficient template)
- ✓ Iterative Refinement (max 5 iterations)
Sub-Questions Generated: {count}
Queries Executed: {count}
Sources Consulted: {count} ({authoritative_count} authoritative, {recent_count} recent)
Iterations Performed: {count}
Output Format: Token-efficient template (Executive Summary + Research Overview + Findings + Synthesis + Recommendations + Sources with URLs)
**Create this file using the Write tool immediately after loading this Skill.**
---Skill:websearch-deep
执行时间:{timestamp}
研究问题:{the question you researched}
模式:深度模式(6阶段方法论)
此文件由深度研究Agent创建,用于验证websearch-deep Skill已成功加载并执行。
应用的阶段:
- ✓ 问题分解(3-5个子问题)
- ✓ 多查询生成(每个子问题3-5种变体)
- ✓ 带来源排名的证据合成(可信度/时效性/相关性)
- ✓ 引用透明化(编号[1][2][3])
- ✓ 结构化输出(高效Token模板)
- ✓ 迭代优化(最多5次迭代)
生成的子问题数量:{count}
执行的查询数量:{count}
参考的来源数量:{count}({authoritative_count}个权威来源,{recent_count}个近期来源)
执行的迭代次数:{count}
输出格式:高效Token模板(执行摘要 + 研究概述 + 研究发现 + 信息整合 + 建议 + 带URL的来源列表)
**加载此Skill后,请立即使用Write工具创建该文件。**
---What This Skill Does
此Skill的功能
Provides comprehensive deep research methodology for complex, multi-faceted questions requiring synthesis across multiple domains. Implements ChatGPT-style deep investigation with problem decomposition, multi-query strategies, evidence synthesis, citation transparency, and iterative refinement.
为需要跨多领域整合信息的复杂、多维度问题提供全面的深度研究方法论。实现ChatGPT风格的深度调研,包含问题分解、多查询策略、证据合成、引用透明化以及迭代优化。
When to Use This Skill
适用场景
Universal Applicability: Use this Skill for ANY question requiring comprehensive multi-source analysis with evidence synthesis - technical, business, educational, strategic, or investigative.
Question Types Supported:
- ✅ Technical: Architecture decisions, algorithms, best practices, technology selection
- ✅ Business: Market analysis, competitive research, vendor comparison, trends
- ✅ Educational: Learning resources, concept explanations, methodology guides
- ✅ Strategic: Technology roadmaps, policy analysis, decision frameworks
- ✅ Investigative: Root cause analysis, incident research, pattern identification
- ✅ Non-Technical: Remote work policies, organizational structures, process improvements
Example Questions:
- "What's the best architecture for integrating X with Y?" (Technical)
- "Should we use microservices or monolith?" (Strategic)
- "What are the benefits of remote work policies?" (Business/Non-Technical)
- "How do prime number generation algorithms compare?" (Educational/Technical)
- "What factors should influence our cloud vendor selection?" (Business/Strategic)
Triggers: Keywords like "architecture", "integration", "best", "strategy", "recommendations", "compare", "evaluate", "migrate", "benefits", "how", "why", "should we"
Key Signal: If the question requires comprehensive multi-source analysis with evidence synthesis → use this Skill
通用适用性:任何需要多来源分析并进行证据整合的问题,无论技术、商业、教育、战略或调研类问题,都可使用此Skill。
支持的问题类型:
- ✅ 技术类:架构决策、算法、最佳实践、技术选型
- ✅ 商业类:市场分析、竞品调研、供应商对比、行业趋势
- ✅ 教育类:学习资源、概念解释、方法论指南
- ✅ 战略类:技术路线图、政策分析、决策框架
- ✅ 调研类:根因分析、事件调研、模式识别
- ✅ 非技术类:远程办公政策、组织结构、流程优化
示例问题:
- "2025年将Salesforce与SQL Server集成的最佳架构是什么?"(技术类)
- "我们应该使用微服务还是单体架构?"(战略类)
- "远程办公政策有哪些优势?"(商业/非技术类)
- "质数生成算法对比?"(教育/技术类)
- "影响我们云供应商选择的因素有哪些?"(商业/战略类)
触发关键词:architecture、integration、best、strategy、recommendations、compare、evaluate、migrate、benefits、how、why、should we
关键信号:如果问题需要全面的多来源分析并进行证据整合 → 使用此Skill
Instructions
操作步骤
Phase 1: Problem Decomposition
阶段1:问题分解
Objective: Break complex questions into 3-5 clear, focused sub-questions.
🔴 CRITICAL - Research Scope:
Deep research finds external knowledge ONLY - you have no codebase access.
What you CAN research:
- ✅ Official documentation: Vendor websites (anthropic.com, docs.microsoft.com, etc.)
- ✅ Blog posts & articles: Technical blogs, Medium, Dev.to, engineering blogs
- ✅ Community resources: Stack Overflow, GitHub discussions, Reddit, forums
- ✅ Industry best practices: Design patterns, architecture patterns, standard approaches
- ✅ Academic papers: Research papers, whitepapers, conference proceedings
- ✅ Library documentation: Via Context7 MCP (resolve library → get docs)
- ✅ Web content: Via Fetch MCP for HTML content
What you CANNOT research:
- ❌ Internal project files: No Read/Grep/Glob tools available
- ❌ Codebase patterns: Use /explain:architecture or research-codebase-analyst instead
- ❌ Project-specific implementations: Not in scope for external research
If question asks about "my project" or "this codebase":
Return error from agent file (scope validation section) and stop.
Process:
- Identify the primary research question
- Analyze question structure and intent
- Decompose into logical sub-components that collectively address the full question
Sub-Question Criteria:
- Specific: Each has clear, focused scope
- Complete: Together they cover the full question
- Independent: Can be researched separately
- Actionable: Lead to concrete findings
Example Decomposition:
Primary: "What's the best architecture for integrating Salesforce with SQL Server in 2025?"
Sub-Questions:
1. What are Salesforce's current integration capabilities and APIs (2025)?
2. What are SQL Server's integration patterns and best practices?
3. What middleware or integration platforms are commonly used?
4. What security and compliance considerations matter?
5. What scalability and performance factors should influence choice?目标:将复杂问题拆解为3-5个清晰、聚焦的子问题。
🔴 关键 - 研究范围:
深度研究仅查找外部知识 - 无法访问代码库。
可研究内容:
- ✅ 官方文档:供应商网站(anthropic.com、docs.microsoft.com等)
- ✅ 博客与文章:技术博客、Medium、Dev.to、工程博客
- ✅ 社区资源:Stack Overflow、GitHub讨论区、Reddit、论坛
- ✅ 行业最佳实践:设计模式、架构模式、标准方案
- ✅ 学术论文:研究论文、白皮书、会议论文集
- ✅ 库文档:通过Context7 MCP获取(解析库 → 获取文档)
- ✅ 网页内容:通过Fetch MCP获取HTML内容
不可研究内容:
- ❌ 内部项目文件:无法使用Read/Grep/Glob工具
- ❌ 代码库模式:请使用/explain:architecture或research-codebase-analyst
- ❌ 项目特定实现:不在外部研究范围内
如果问题涉及"我的项目"或"此代码库":
从Agent文件返回错误(范围验证部分)并停止操作。
流程:
- 确定核心研究问题
- 分析问题结构与意图
- 将问题拆解为逻辑子组件,共同覆盖原问题的全部范围
子问题标准:
- 具体:每个子问题都有清晰、聚焦的范围
- 完整:共同覆盖原问题的全部内容
- 独立:可单独进行研究
- 可操作:能导向具体的研究发现
分解示例:
核心问题:"2025年将Salesforce与SQL Server集成的最佳架构是什么?"
子问题:
1. 2025年Salesforce的当前集成能力与API有哪些?
2. SQL Server的集成模式与最佳实践是什么?
3. 常用的中间件或集成平台有哪些?
4. 需要考虑哪些安全与合规因素?
5. 哪些可扩展性与性能因素会影响选择?Phase 2: Multi-Query Generation
阶段2:多查询生成
Objective: Generate 3-5 query variations per sub-question to maximize coverage (15-25 total searches).
Query Variation Strategy:
- Variation 1 - Broad/General: "Salesforce integration APIs 2025"
- Variation 2 - Specific/Technical: "Salesforce REST API bulk data operations"
- Variation 3 - Comparison/Alternatives: "Salesforce API vs MuleSoft vs Dell Boomi"
- Variation 4 - Best Practices: "Salesforce SQL Server integration patterns"
- Variation 5 - Recent Updates: "Salesforce API updates 2025"
Advanced Search Operators:
- - Search specific domains
site:domain.com - - Find PDF documents
filetype:pdf - - Search page titles
intitle:"keyword" - - Search URLs
inurl:keyword - - Recent content only
after:2024 - - Exact matching
"exact phrase"
Example Multi-Query Set:
Sub-Q1: Salesforce Integration Capabilities
- site:salesforce.com "API" "integration" "2025"
- "Salesforce REST API" "rate limits" after:2024
- "Salesforce Bulk API 2.0" "best practices"
- filetype:pdf "Salesforce integration guide" 2025
- "Salesforce API" "breaking changes" after:2024目标:为每个子问题生成3-5种查询变体,以最大化覆盖范围(总计15-25次搜索)。
查询变体策略:
- 变体1 - 宽泛/通用:"Salesforce integration APIs 2025"
- 变体2 - 具体/技术:"Salesforce REST API bulk data operations"
- 变体3 - 对比/替代方案:"Salesforce API vs MuleSoft vs Dell Boomi"
- 变体4 - 最佳实践:"Salesforce SQL Server integration patterns"
- 变体5 - 近期更新:"Salesforce API updates 2025"
高级搜索运算符:
- - 搜索特定域名
site:domain.com - - 查找PDF文档
filetype:pdf - - 搜索页面标题
intitle:"keyword" - - 搜索URL
inurl:keyword - - 仅搜索近期内容
after:2024 - - 精确匹配
"exact phrase"
多查询集合示例:
子问题1:Salesforce集成能力
- site:salesforce.com "API" "integration" "2025"
- "Salesforce REST API" "rate limits" after:2024
- "Salesforce Bulk API 2.0" "best practices"
- filetype:pdf "Salesforce integration guide" 2025
- "Salesforce API" "breaking changes" after:2024Query Templates for Common Research Types
常见研究类型的查询模板
Use these templates to formulate high-quality queries for different research types:
1. Technical Architecture Research
Official Docs: site:docs.{vendor}.com "{topic}" "architecture patterns" OR "design patterns"
Best Practices: "{topic}" "best practices" "production" after:2024
Comparisons: "{topic}" vs "{alternative}" "comparison" "pros cons"
Limitations: "{topic}" "limitations" OR "drawbacks" OR "challenges"
Recent Updates: site:{vendor}.com "{topic}" "updates" OR "changes" after:20242. Framework/Library Research
Official Docs: site:docs.{framework}.com "{feature}" "guide" OR "documentation"
Community: site:stackoverflow.com "{framework}" "{feature}" "how to"
Real-World: "{framework}" "{feature}" "production" OR "case study" after:2024
Performance: "{framework}" "performance" OR "benchmarks" OR "optimization"
Ecosystem: "{framework}" "ecosystem" OR "plugins" OR "extensions" 20253. Business/Strategy Research
Industry Analysis: "{topic}" "market analysis" OR "industry trends" 2024 2025
Vendor Comparison: "{vendor A}" vs "{vendor B}" "comparison" "review"
ROI/Benefits: "{solution}" "ROI" OR "benefits" OR "value proposition"
Implementation: "{solution}" "implementation guide" OR "getting started"
Case Studies: "{solution}" "case study" OR "customer success" after:20244. Educational/Learning Research
Fundamentals: "{topic}" "introduction" OR "beginner guide" OR "explained"
Advanced: "{topic}" "advanced" OR "deep dive" OR "internals"
Tutorials: "{topic}" "tutorial" OR "step by step" after:2024
Common Mistakes: "{topic}" "common mistakes" OR "anti-patterns" OR "pitfalls"
Resources: "{topic}" "learning resources" OR "courses" OR "books" 20255. Compliance/Security Research
Standards: "{topic}" "{standard}" "compliance" (e.g., "GDPR", "SOC2", "HIPAA")
Security: "{topic}" "security" "best practices" OR "vulnerabilities" after:2024
Official Guidance: site:{regulator}.gov "{topic}" "guidance" OR "requirements"
Audit: "{topic}" "audit" OR "checklist" OR "certification"
Tools: "{topic}" "{compliance}" "tools" OR "automation" 20256. Performance/Optimization Research
Benchmarks: "{topic}" "benchmark" OR "performance" "comparison" after:2024
Bottlenecks: "{topic}" "bottleneck" OR "slow" OR "performance issues"
Optimization: "{topic}" "optimization" OR "tuning" OR "best practices"
Monitoring: "{topic}" "monitoring" OR "observability" OR "metrics"
Scaling: "{topic}" "scalability" OR "high traffic" OR "production scale"Priority: Official Sources First
- Always execute or
site:anthropic.comqueries firstsite:docs.{vendor}.com - Use official docs results to refine community/blog queries
- Cross-reference official guidance with real-world experiences
使用以下模板为不同研究类型制定高质量查询:
1. 技术架构研究
官方文档:site:docs.{vendor}.com "{topic}" "architecture patterns" OR "design patterns"
最佳实践:"{topic}" "best practices" "production" after:2024
对比:"{topic}" vs "{alternative}" "comparison" "pros cons"
局限性:"{topic}" "limitations" OR "drawbacks" OR "challenges"
近期更新:site:{vendor}.com "{topic}" "updates" OR "changes" after:20242. 框架/库研究
官方文档:site:docs.{framework}.com "{feature}" "guide" OR "documentation"
社区:site:stackoverflow.com "{framework}" "{feature}" "how to"
实际应用:"{framework}" "{feature}" "production" OR "case study" after:2024
性能:"{framework}" "performance" OR "benchmarks" OR "optimization"
生态系统:"{framework}" "ecosystem" OR "plugins" OR "extensions" 20253. 商业/战略研究
行业分析:"{topic}" "market analysis" OR "industry trends" 2024 2025
供应商对比:"{vendor A}" vs "{vendor B}" "comparison" "review"
投资回报率/收益:"{solution}" "ROI" OR "benefits" OR "value proposition"
实施:"{solution}" "implementation guide" OR "getting started"
案例研究:"{solution}" "case study" OR "customer success" after:20244. 教育/学习研究
基础:"{topic}" "introduction" OR "beginner guide" OR "explained"
进阶:"{topic}" "advanced" OR "deep dive" OR "internals"
教程:"{topic}" "tutorial" OR "step by step" after:2024
常见错误:"{topic}" "common mistakes" OR "anti-patterns" OR "pitfalls"
资源:"{topic}" "learning resources" OR "courses" OR "books" 20255. 合规/安全研究
标准:"{topic}" "{standard}" "compliance"(例如:"GDPR"、"SOC2"、"HIPAA")
安全:"{topic}" "security" "best practices" OR "vulnerabilities" after:2024
官方指南:site:{regulator}.gov "{topic}" "guidance" OR "requirements"
审计:"{topic}" "audit" OR "checklist" OR "certification"
工具:"{topic}" "{compliance}" "tools" OR "automation" 20256. 性能/优化研究
基准测试:"{topic}" "benchmark" OR "performance" "comparison" after:2024
瓶颈:"{topic}" "bottleneck" OR "slow" OR "performance issues"
优化:"{topic}" "optimization" OR "tuning" OR "best practices"
监控:"{topic}" "monitoring" OR "observability" OR "metrics"
扩容:"{topic}" "scalability" OR "high traffic" OR "production scale"优先级:优先官方来源
- 始终优先执行或
site:anthropic.com查询site:docs.{vendor}.com - 使用官方文档结果优化社区/博客查询
- 交叉验证官方指南与实际经验
🔴 CRITICAL: Execute Queries in Parallel Batches
🔴 关键:并行批量执行查询
Execution Pattern (MANDATORY for performance):
DO NOT execute queries sequentially (one at a time). Instead, batch into groups of 5-10 and execute in parallel within single messages.
Batching Strategy:
- Generate all 15-25 queries upfront (across all sub-questions)
- Group into batches of 5-10 queries
- Execute each batch in a single message with multiple WebSearch tool calls
- Wait for batch to complete, then proceed to next batch
Implementation Pattern:
python
undefined执行模式(为保证性能,必须遵守):
请勿按顺序执行查询(逐个执行)。请将查询分组为5-10个一组,在单个消息中并行执行。
批量策略:
- 预先生成全部15-25个查询(覆盖所有子问题)
- 将查询分组为5-10个一组的批次
- 在单个消息中通过多个WebSearch工具调用执行每个批次
- 等待批次完成后,再进行下一个批次
实现模式:
python
undefinedStep 1: Generate all queries first
步骤1:先生成所有查询
all_queries = []
for sub_question in sub_questions:
queries = generate_query_variations(sub_question) # 3-5 queries per sub-Q
all_queries.extend(queries)
all_queries = []
for sub_question in sub_questions:
queries = generate_query_variations(sub_question) # 每个子问题3-5个查询
all_queries.extend(queries)
Total: 15-25 queries across all sub-questions
总计:所有子问题共15-25个查询
Step 2: Execute in parallel batches
步骤2:并行批量执行
batch_size = 5 # Adjust 5-10 based on query complexity
for i in range(0, len(all_queries), batch_size):
batch = all_queries[i:i+batch_size]
# Step 3: Execute ALL queries in batch SIMULTANEOUSLY in single message
# Example: If batch = [q1, q2, q3, q4, q5], call:
# WebSearch(q1)
# WebSearch(q2)
# WebSearch(q3)
# WebSearch(q4)
# WebSearch(q5)
# ALL FIVE in the SAME message as parallel tool uses
results = execute_parallel_batch(batch)
process_batch_results(results) # Collect sources immediately
**Why This Matters**:
- **Sequential Execution**: 25 queries × 1s each = 25s total
- **Batched Execution** (5 per batch): 5 batches × 1s = 5s total
- **Speedup: 3-5x faster** for Phase 2
**Batch Size Guidance**:
- **Simple queries** (keywords only): Use batch_size=10
- **Complex queries** (advanced operators, multiple site: filters): Use batch_size=5
- **Re-queries** in iteration 2+: Use batch_size=3-5
**Example Batched Execution**:Generated 25 queries across 5 sub-questions
Batch 1 (5 queries - executed in parallel):
WebSearch("site:salesforce.com 'API' 'integration' '2025'")
WebSearch("'Salesforce REST API' 'rate limits' after:2024")
WebSearch("'Salesforce Bulk API 2.0' 'best practices'")
WebSearch("filetype:pdf 'Salesforce integration guide' 2025")
WebSearch("'Salesforce API' 'breaking changes' after:2024")
→ Batch completes in ~1s, 5 results returned
Batch 2 (5 queries - executed in parallel):
WebSearch("'SQL Server ETL' 'best practices' 'real-time'")
WebSearch("site:docs.microsoft.com 'SQL Server' 'integration'")
...
→ Batch completes in ~1s, 5 results returned
Total: 5 batches × 1s each = ~5s (vs 25s sequential)
undefinedbatch_size = 5 # 根据查询复杂度调整为5-10
for i in range(0, len(all_queries), batch_size):
batch = all_queries[i:i+batch_size]
# 步骤3:在单个消息中同时执行批次中的所有查询
# 示例:如果batch = [q1, q2, q3, q4, q5],调用:
# WebSearch(q1)
# WebSearch(q2)
# WebSearch(q3)
# WebSearch(q4)
# WebSearch(q5)
# 全部五个在同一条消息中并行调用工具
results = execute_parallel_batch(batch)
process_batch_results(results) # 立即收集来源
**为什么这很重要**:
- **顺序执行**:25个查询 × 每个1秒 = 总计25秒
- **批量执行**(每组5个):5个批次 × 每个1秒 = 总计5秒
- **提速:3-5倍** 用于阶段2
**批量大小指南**:
- **简单查询**(仅关键词):使用batch_size=10
- **复杂查询**(高级运算符、多个site:过滤器):使用batch_size=5
- **迭代2+中的重新查询**:使用batch_size=3-5
**批量执行示例**:为5个子问题生成25个查询
批次1(5个查询 - 并行执行):
WebSearch("site:salesforce.com 'API' 'integration' '2025'")
WebSearch("'Salesforce REST API' 'rate limits' after:2024")
WebSearch("'Salesforce Bulk API 2.0' 'best practices'")
WebSearch("filetype:pdf 'Salesforce integration guide' 2025")
WebSearch("'Salesforce API' 'breaking changes' after:2024")
→ 批次约1秒完成,返回5个结果
批次2(5个查询 - 并行执行):
WebSearch("'SQL Server ETL' 'best practices' 'real-time'")
WebSearch("site:docs.microsoft.com 'SQL Server' 'integration'")
...
→ 批次约1秒完成,返回5个结果
总计:5个批次 × 每个1秒 = 约5秒(对比顺序执行的25秒)
undefinedPhase 3: Evidence Synthesis
阶段3:证据合成
Objective: Collect, rank, deduplicate, and synthesize evidence from multiple sources.
Processing Batched Results:
Since Phase 2 executed queries in parallel batches, you'll receive results grouped by batch. Process all results from all batches together:
- Flatten results: Combine batch 1 + batch 2 + batch 3 + ... → single unified results list
- Deduplicate: Remove duplicate URLs across all batches (same source may appear in multiple queries)
- Rank all sources: Apply 0-10 scoring to the complete flattened list (not per-batch)
- Proceed with synthesis: Use the unified, deduplicated, ranked source list for evidence synthesis
Example:
python
undefined目标:收集、排名、去重并整合多来源的证据。
批量结果处理:
由于阶段2是并行批量执行查询,你会收到按批次分组的结果。请将所有批次的结果一起处理:
- 扁平化结果:合并批次1 + 批次2 + 批次3 + ... → 单个统一结果列表
- 去重:移除所有批次中的重复URL(同一来源可能出现在多个查询中)
- 对所有来源排名:对完整的扁平化列表(而非按批次)应用0-10分评分
- 进行合成:使用统一、去重、排名后的来源列表进行证据合成
示例:
python
undefinedCollect results from all batches
收集所有批次的结果
all_results = []
all_results.extend(batch1_results) # 5 results from batch 1
all_results.extend(batch2_results) # 5 results from batch 2
all_results.extend(batch3_results) # 5 results from batch 3
all_results.extend(batch4_results) # 5 results from batch 4
all_results.extend(batch5_results) # 5 results from batch 5
all_results = []
all_results.extend(batch1_results) # 批次1的5个结果
all_results.extend(batch2_results) # 批次2的5个结果
all_results.extend(batch3_results) # 批次3的5个结果
all_results.extend(batch4_results) # 批次4的5个结果
all_results.extend(batch5_results) # 批次5的5个结果
Total: ~25 results (before deduplication)
总计:约25个结果(去重前)
Deduplicate by URL
按URL去重
unique_sources = deduplicate_by_url(all_results)
unique_sources = deduplicate_by_url(all_results)
After dedup: ~15-20 unique sources (duplicates removed)
去重后:约15-20个唯一来源(已移除重复项)
Rank all unique sources
对所有唯一来源排名
ranked_sources = rank_sources(unique_sources) # Apply scoring below
undefinedranked_sources = rank_sources(unique_sources) # 应用以下评分规则
undefined3a. Source Ranking (0-10 Scale)
3a. 来源排名(0-10分制)
Rank every source on three dimensions:
Credibility Score (0-10):
- 10: Official documentation, peer-reviewed papers
- 7-9: Established tech publications (TechCrunch, Ars Technica), reputable vendors
- 4-6: Technical blogs, Stack Overflow, community forums
- 1-3: Unverified sources, marketing content, personal blogs
Freshness Score (0-10):
- 10: Published within last 3 months
- 7-9: Published within last 6-12 months
- 4-6: Published within last 1-2 years
- 1-3: Older than 2 years
Relevance Score (0-10):
- 10: Directly addresses sub-question with concrete examples
- 7-9: Addresses sub-question with partial detail
- 4-6: Tangentially related, requires interpretation
- 1-3: Mentions topic briefly, minimal value
Overall Source Quality = (Credibility × 0.5) + (Freshness × 0.2) + (Relevance × 0.3)
从三个维度对每个来源进行排名:
可信度评分(0-10):
- 10分:官方文档、同行评审论文
- 7-9分:知名科技出版物(TechCrunch、Ars Technica)、信誉良好的供应商
- 4-6分:技术博客、Stack Overflow、社区论坛
- 1-3分:未验证来源、营销内容、个人博客
时效性评分(0-10):
- 10分:近3个月内发布
- 7-9分:近6-12个月内发布
- 4-6分:近1-2年内发布
- 1-3分:发布超过2年
相关性评分(0-10):
- 10分:直接回答子问题并包含具体示例
- 7-9分:回答子问题但细节不全
- 4-6分:间接相关,需要解读
- 1-3分:仅简要提及主题,价值极低
来源整体质量 = (可信度 × 0.5) + (时效性 × 0.2) + (相关性 × 0.3)
3b. Deduplication
3b. 去重
- Identify duplicate findings across sources
- Prefer higher-quality sources (overall score) when duplicates exist
- Note consensus: 3+ sources agreeing = strong signal
- Flag outliers: Single source claiming something unique
- 识别不同来源中的重复发现
- 当存在重复时,优先选择质量更高的来源(整体评分)
- 记录共识:3个及以上来源一致 = 强信号
- 标记异常值:单个来源提出的独特观点
3c. Contradiction Resolution
3c. 矛盾解决
When sources contradict:
- Check dates: Newer source may reflect recent changes
- Assess authority: Official docs override blog posts
- Present both views: "Source A [1] recommends X, while Source B [2] suggests Y due to..."
- Explain context: "Approach depends on scale: <100k records use X [1], >1M records use Y [2]"
当来源存在矛盾时:
- 检查日期:较新的来源可能反映了近期变化
- 评估权威性:官方文档优先于博客
- 呈现双方观点:“来源A [1]推荐X,而来源B [2]建议Y,原因是...”
- 解释背景:“方案选择取决于规模:<10万条记录使用X [1],>100万条记录使用Y [2]”
Phase 4: Citation Transparency (Clickable Format)
阶段4:引用透明化(可点击格式)
Objective: Provide numbered, clickable citations for every factual claim.
🔴 CRITICAL - Use Descriptive Inline Links:
Inline Citation Format (Descriptive Names - Natural Language):
markdown
Text with claim from [OpenAI: GPT-4](https://url "GPT-4 Technical Report (OpenAI, 2023-03-14)") and [Anthropic: Claude](https://url2 "Introducing Claude (Anthropic, 2023-03-14)"). Multiple sources: [Google DeepMind: Gemini](https://url3 "Gemini Model (Google DeepMind, 2023-12-06)"), [Meta: LLaMA](https://url4 "LLaMA Paper (Meta AI, 2023-02-24)").Why descriptive names?
- ✅ More readable inline (natural language flow)
- ✅ Self-documenting (reader knows source without checking References)
- ✅ Still clickable with tooltips
- ✅ Works in ALL markdown viewers (GitHub, VS Code, Obsidian, GitLab, terminals)
Format:
markdown
[Organization: Topic](full-URL "Full Title (Publisher, YYYY-MM-DD)")Creating Descriptive Names (from URL analysis):
- Extract organization: From domain (openai.com → OpenAI, anthropic.com → Anthropic)
- Extract topic: From URL path or title (gpt-4 → GPT-4, claude → Claude)
- Use format:
[Org: Topic] - For duplicates: Add descriptive suffixes - ,
[OpenAI: GPT-4],[OpenAI: DALL-E][OpenAI: Whisper] - For generic pages: Use page type - ,
[Stack Overflow: OAuth Implementation][Medium: React Patterns]
References Section Format (at end of research - grouped by category):
markdown
undefined目标:为每个事实性声明提供编号、可点击的引用。
🔴 关键 - 使用描述性内联链接:
内联引用格式(描述性名称 - 自然语言):
markdown
包含来自[OpenAI: GPT-4](https://url "GPT-4 Technical Report (OpenAI, 2023-03-14)")和[Anthropic: Claude](https://url2 "Introducing Claude (Anthropic, 2023-03-14)")声明的文本。多来源示例:[Google DeepMind: Gemini](https://url3 "Gemini Model (Google DeepMind, 2023-12-06)")、[Meta: LLaMA](https://url4 "LLaMA Paper (Meta AI, 2023-02-24)")。为什么使用描述性名称?
- ✅ 内联可读性更强(自然语言流畅)
- ✅ 自文档化(读者无需查看参考文献即可知道来源)
- ✅ 仍可点击并显示工具提示
- ✅ 适用于所有markdown查看器(GitHub、VS Code、Obsidian、GitLab、终端)
格式:
markdown
[机构: 主题](完整URL "完整标题(发布方,YYYY-MM-DD)")创建描述性名称(通过URL分析):
- 提取机构:从域名获取(openai.com → OpenAI,anthropic.com → Anthropic)
- 提取主题:从URL路径或标题获取(gpt-4 → GPT-4,claude → Claude)
- 使用格式:
[机构: 主题] - 重复来源处理:添加描述性后缀 - 、
[OpenAI: GPT-4]、[OpenAI: DALL-E][OpenAI: Whisper] - 通用页面处理:使用页面类型 - 、
[Stack Overflow: OAuth实现][Medium: React模式]
参考文献部分格式(位于研究末尾 - 按类别分组):
markdown
undefinedReferences
参考文献
Official Documentation
官方文档
- OpenAI: GPT-4 (2023-03-14). "GPT-4 Technical Report". https://openai.com/research/gpt-4
- Anthropic: Claude (2023-03-14). "Introducing Claude". https://www.anthropic.com/claude
- OpenAI: GPT-4 (2023-03-14). "GPT-4 Technical Report". https://openai.com/research/gpt-4
- Anthropic: Claude (2023-03-14). "Introducing Claude". https://www.anthropic.com/claude
Blog Posts & Articles
博客与文章
- Google DeepMind: Gemini (2023-12-06). "Gemini: A Family of Highly Capable Models". https://deepmind.google/technologies/gemini
- Meta: LLaMA (2023-02-24). "Introducing LLaMA". https://ai.meta.com/blog/llama
- Google DeepMind: Gemini (2023-12-06). "Gemini: A Family of Highly Capable Models". https://deepmind.google/technologies/gemini
- Meta: LLaMA (2023-02-24). "Introducing LLaMA". https://ai.meta.com/blog/llama
Academic Papers
学术论文
- Attention Is All You Need (2017-06-12). Vaswani et al. https://arxiv.org/abs/1706.03762
- Attention Is All You Need (2017-06-12). Vaswani et al. https://arxiv.org/abs/1706.03762
Community Resources
社区资源
- Stack Overflow: OAuth Implementation (2024-08-15). https://stackoverflow.com/questions/12345
**Why grouped References section?**
- Provides organized list view by source type
- Easy to scan authoritative vs. community sources
- Shows evidence diversity at a glance
- Copy-paste for further research
**Category Guidance**:
- **Official Documentation**: Vendor docs, API references, official guides
- **Blog Posts & Articles**: Company engineering blogs, Medium, Dev.to, technical articles
- **Academic Papers**: arXiv, research papers, conference proceedings, whitepapers
- **Community Resources**: Stack Overflow, GitHub discussions, Reddit, forums
**Title Format in Quotes**:
- `"Full Title (Publisher, YYYY-MM-DD)"`
- Keep title concise but descriptive (< 80 chars if possible)
- Always include publisher and date for credibility
**Hover Behavior**:
Most markdown viewers (GitHub, VS Code, Obsidian, GitLab) show the title as a tooltip when hovering over the citation.
**Click Behavior**:
Clicking the descriptive name opens the URL directly in browser.
**Example Inline Usage**:
```markdown
Salesforce provides three primary API types according to [Salesforce: API Docs](https://developer.salesforce.com/docs/apis "Salesforce API Documentation (Salesforce, 2025-01-15)"): REST API for standard operations, [Salesforce: Bulk API 2.0](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/ "Bulk API 2.0 Guide (Salesforce, 2024-11-20)") for large data volumes (>10k records), and [Salesforce: Streaming API](https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/ "Streaming API Guide (Salesforce, 2024-10-05)") for real-time updates. Recent 2025 updates introduced enhanced rate limiting (100k requests/24hrs for Enterprise) and improved error handling as noted in [Salesforce Blog: API Updates](https://developer.salesforce.com/blogs/2025/01/api-updates "API Error Handling Improvements (Salesforce Blog, 2025-01-10)").- Stack Overflow: OAuth实现 (2024-08-15). https://stackoverflow.com/questions/12345
**为什么要分组参考文献部分?**
- 按来源类型提供有序的列表视图
- 便于快速浏览权威来源与社区来源
- 一目了然地展示证据多样性
- 可直接复制粘贴用于进一步研究
**类别指南**:
- **官方文档**:供应商文档、API参考、官方指南
- **博客与文章**:企业工程博客、Medium、Dev.to、技术文章
- **学术论文**:arXiv、研究论文、会议论文集、白皮书
- **社区资源**:Stack Overflow、GitHub讨论区、Reddit、论坛
**标题格式(带引号)**:
- `"完整标题(发布方,YYYY-MM-DD)"`
- 标题应简洁但具描述性(尽可能控制在80字符以内)
- 始终包含发布方与日期以保证可信度
**悬停行为**:
大多数markdown查看器(GitHub、VS Code、Obsidian、GitLab)在悬停引用时会显示标题作为工具提示。
**点击行为**:
点击描述性名称会直接在浏览器中打开URL。
**内联使用示例**:
```markdown
根据[Salesforce: API文档](https://developer.salesforce.com/docs/apis "Salesforce API Documentation (Salesforce, 2025-01-15)"),Salesforce提供三种主要API类型:用于标准操作的REST API、[Salesforce: Bulk API 2.0](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/ "Bulk API 2.0 Guide (Salesforce, 2024-11-20)")(用于大数据量>1万条记录),以及用于实时更新的[Salesforce: Streaming API](https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/ "Streaming API Guide (Salesforce, 2024-10-05)")。2025年的近期更新引入了增强的速率限制(企业版10万请求/24小时)与改进的错误处理,如[Salesforce博客: API更新](https://developer.salesforce.com/blogs/2025/01/api-updates "API Error Handling Improvements (Salesforce Blog, 2025-01-10)")所述。References
参考文献
Official Documentation
官方文档
- Salesforce: API Docs (2025-01-15). "Salesforce API Documentation". https://developer.salesforce.com/docs/apis
- Salesforce: Bulk API 2.0 (2024-11-20). "Bulk API 2.0 Developer Guide". https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/
- Salesforce: Streaming API (2024-10-05). "Streaming API Developer Guide". https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/
- Salesforce: API文档 (2025-01-15). "Salesforce API Documentation". https://developer.salesforce.com/docs/apis
- Salesforce: Bulk API 2.0 (2024-11-20). "Bulk API 2.0 Developer Guide". https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/
- Salesforce: Streaming API (2024-10-05). "Streaming API Developer Guide". https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/
Blog Posts & Articles
博客与文章
- Salesforce Blog: API Updates (2025-01-10). "API Error Handling Improvements". https://developer.salesforce.com/blogs/2025/01/api-updates
**Compatibility**: Works in GitHub, VS Code (preview), Obsidian, GitLab, all markdown viewers- Salesforce博客: API更新 (2025-01-10). "API Error Handling Improvements". https://developer.salesforce.com/blogs/2025/01/api-updates
**兼容性**:适用于GitHub、VS Code(预览)Phase 5: Structured Output (Balanced - Target 250-350 Lines)
阶段5:结构化输出(平衡型 - 目标250-350行)
Objective: Deliver comprehensive, implementation-ready findings with narrative depth.
Design Principles:
- ✅ Balanced depth (250-350 lines) - not too verbose, not over-condensed
- ✅ Repository-agnostic (no repo-specific details)
- ✅ Implementation-ready (Executive Summary + Recommendations guide next steps)
- ✅ Sources with full URLs (non-negotiable)
- ✅ Universal (works for any question: technical, business, educational, strategic)
Output Template:
markdown
undefined目标:提供全面、可直接落地的研究发现,兼具叙事深度。
设计原则:
- ✅ 平衡深度(250-350行)- 不过于冗长,也不过度精简
- ✅ 与仓库无关(无仓库特定细节)
- ✅ 可直接落地(执行摘要 + 建议指导下一步行动)
- ✅ 包含完整URL的来源(必不可少)
- ✅ 通用(适用于任何问题:技术、商业、教育、战略)
输出模板:
markdown
undefinedDeep Research: {Question}
深度研究:{问题}
Executive Summary
执行摘要
{2-3 paragraph synthesis covering:
- What was researched and why it matters
- Key findings with citations [Org: Topic]
- Strategic recommendation with rationale}
Example length: ~150-200 words total across 2-3 paragraphs.
{2-3段整合内容,包含:
- 研究内容及其重要性
- 带引用的关键发现[机构: 主题]
- 带理由的战略建议}
示例长度:2-3段总计约150-200词。
Research Overview
研究概述
- Sub-Questions Analyzed: {count}
- Queries Executed: {count} queries
- Sources: {count} total ({authoritative_count} authoritative / {auth_pct}%, {recent_count} recent / {recent_pct}%)
- Iterations: {count}
- 分析的子问题数量:{count}
- 执行的查询数量:{count}个查询
- 来源数量:总计{count}个(权威来源{authoritative_count}个 / {auth_pct}%,近期来源{recent_count}个 / {recent_pct}%)
- 迭代次数:{count}
Findings
研究发现
1. {Sub-Question 1}
1. {子问题1}
{Opening paragraph: What this sub-question addresses and why it's important}
{2-4 paragraphs of synthesized narrative with inline citations [1][2][3]. Each paragraph covers a specific aspect or theme. Include:
- Core concepts and definitions with citations
- How different sources approach the topic
- Practical implications and examples
- Performance characteristics or trade-offs where relevant}
Key Insights:
- {Insight 1: Specific, actionable statement} - {Why it matters and implications} [Org: Topic], [Org: Topic]
- {Insight 2: Specific, actionable statement} - {Why it matters and implications} [Org: Topic]
- {Insight 3: Specific, actionable statement} - {Why it matters and implications} [Org: Topic]
{Optional: Common Patterns or Best Practices subsection if relevant with 2-3 bullet points}
{开篇段落:此子问题解决的内容及其重要性}
{2-4段整合叙事内容,带内联引用[1][2][3]。每段覆盖特定方面或主题。包含:
- 带引用的核心概念与定义
- 不同来源对主题的处理方式
- 实际影响与示例
- 相关的性能特征或权衡}
关键洞察:
- {洞察1:具体、可操作的陈述} - {重要性与影响}[机构: 主题]、[机构: 主题]
- {洞察2:具体、可操作的陈述} - {重要性与影响}[机构: 主题]
- {洞察3:具体、可操作的陈述} - {重要性与影响}[机构: 主题]
{可选:常见模式或最佳实践小节(如相关),包含2-3个要点}
2. {Sub-Question 2}
2. {子问题2}
{Repeat the same structure: Opening paragraph + 2-4 narrative paragraphs + 3-5 Key Insights}
{...continue for all sub-questions...}
{重复相同结构:开篇段落 + 2-4段叙事内容 + 3-5个关键洞察要点}
{...继续所有子问题...}
Synthesis
信息整合
{2-3 paragraphs integrating findings across sub-questions. Show how the pieces fit together and what the big picture reveals.}
Consensus (3+ sources agree):
- {Consensus point 1 with source count} [Org: Topic], [Org: Topic], [Org: Topic]
- {Consensus point 2 with source count} [Org: Topic], [Org: Topic], [Org: Topic], [Org: Topic]
Contradictions (if present):
- {Topic}: {Source A perspective [Org: Topic]} vs {Source B perspective [Org: Topic]}. {Resolution or context explaining difference}
Research Gaps (if any):
- {Gap 1}: {What wasn't found and why it matters}
{2-3段整合所有子问题的研究发现。展示各部分如何关联,以及整体呈现的结论}
共识(3个及以上来源一致):
- {共识点1,带来源数量}[机构: 主题]、[机构: 主题]、[机构: 主题]
- {共识点2,带来源数量}[机构: 主题]、[机构: 主题]、[机构: 主题]、[机构: 主题]
矛盾(如存在):
- {主题}:{来源A的观点[机构: 主题]} vs {来源B的观点[机构: 主题]}。{解决方式或解释差异的背景}
研究空白(如有):
- {空白1}:{未找到的内容及其重要性}
Recommendations
建议
Critical (Do First)
关键优先级(立即执行)
-
{Action} - {Detailed rationale explaining why this is critical, what happens if not done, and expected impact} [Org: Topic], [Org: Topic]
-
{Action} - {Detailed rationale} [Org: Topic]
-
{Action} - {Detailed rationale} [Org: Topic]
-
{行动} - {详细理由,解释为何关键、不执行的后果及预期影响}[机构: 主题]、[机构: 主题]
-
{行动} - {详细理由}[机构: 主题]
-
{行动} - {详细理由}[机构: 主题]
Important (Do Next)
重要优先级(下一步执行)
-
{Action} - {Rationale with evidence and expected benefit} [Org: Topic]
-
{Action} - {Rationale with evidence} [Org: Topic]
-
{Action} - {Rationale with evidence} [Org: Topic]
-
{行动} - {带证据的理由及预期收益}[机构: 主题]
-
{行动} - {带证据的理由}[机构: 主题]
-
{行动} - {带证据的理由}[机构: 主题]
Optional (Consider)
可选优先级(考虑执行)
-
{Action} - {Rationale and when/why you might skip this} [Org: Topic]
-
{Action} - {Rationale} [Org: Topic]
-
{行动} - {理由及可跳过的场景}[机构: 主题]
-
{行动} - {理由}[机构: 主题]
References
参考文献
Official Documentation
官方文档
- {Org: Topic} ({YYYY-MM-DD}). "{Full Title}". {Full URL}
- {Org: Topic} ({YYYY-MM-DD}). "{Full Title}". {Full URL}
- {机构: 主题} ({YYYY-MM-DD}). "{完整标题}". {完整URL}
- {机构: 主题} ({YYYY-MM-DD}). "{完整标题}". {完整URL}
Blog Posts & Articles
博客与文章
- {Org: Topic} ({YYYY-MM-DD}). "{Full Title}". {Full URL}
- {机构: 主题} ({YYYY-MM-DD}). "{完整标题}". {完整URL}
Academic Papers
学术论文
- {Paper Title} ({YYYY-MM-DD}). {Authors}. {Full URL}
- {论文标题} ({YYYY-MM-DD}). {作者}. {完整URL}
Community Resources
社区资源
- {Platform: Topic} ({YYYY-MM-DD}). {Full URL}
**Length Guidance**:
- Executive Summary: 150-200 words
- Each Finding section: 300-400 words (opening + narrative + insights)
- Synthesis: 200-250 words
- Recommendations: 3 Critical + 3-4 Important + 2-3 Optional with detailed rationale
- **Total Target**: 250-350 lines
**Requirements**:
- Executive Summary: Scannable in <30 seconds, tells complete story
- Findings: Each section has 2-4 narrative paragraphs PLUS 3-5 Key Insights bullets
- Narrative paragraphs explain concepts, show evidence, connect ideas
- Key Insights are distilled actionable takeaways
- Synthesis: Shows big picture, notes consensus (with source counts), explores contradictions
- Recommendations: Detailed rationale for each (not just bullet point + citation)
- Sources: MUST include full URLs with title, author/org, date
**What NOT to Include** (token waste):
- ❌ Evidence tables with numeric scores (0-10 ratings)
- ❌ Repository-specific details ("Main Thread Log", "CARE quality score")
- ❌ Separate Pros/Cons sections (integrate into Recommendations)
- ❌ Verbose iteration logs or detailed methodology steps- {平台: 主题} ({YYYY-MM-DD}). {完整URL}
**长度指南**:
- 执行摘要:150-200词
- 每个研究发现小节:300-400词(开篇 + 叙事 + 洞察)
- 信息整合:200-250词
- 建议:3个关键 + 3-4个重要 + 2-3个可选,带详细理由
- **总目标**:250-350行
**要求**:
- 执行摘要:30秒内可快速浏览,完整传达核心信息
- 研究发现:每个小节包含2-4段叙事内容 + 3-5个关键洞察要点
- 叙事内容解释概念、展示证据、关联观点
- 关键洞察是提炼后的可操作结论
- 信息整合:展示整体图景,记录共识(带来源数量),探讨矛盾
- 建议:每个建议都有详细理由(不只是要点 + 引用)
- 来源:必须包含完整URL、标题、作者/机构、日期
**请勿包含以下内容**(浪费Token):
- ❌ 带数字评分(0-10分)的证据表格
- ❌ 仓库特定细节("主线程日志"、"CARE质量评分")
- ❌ 单独的优缺点小节(整合到建议中)
- ❌ 冗长的迭代日志或详细方法论步骤Phase 6: Iterative Refinement
阶段6:迭代优化
Objective: Validate completeness and re-query gaps (max 5 iterations).
Completeness Validation Checklist:
- All sub-questions have findings with 3+ source citations?
- Contradictions identified and explained? (If none, explicitly state "No contradictions found")
- Recent sources included (within 6-12 months)?
- Authoritative sources prioritized (official docs)?
- Practical recommendations provided (3 Critical + 3-4 Important + 2-3 Optional)?
- Research gaps explicitly noted?
Automated Gap Detection Logic:
python
gaps = []
completeness_score = 100目标:验证完整性并重新查询空白内容(最多5次迭代)。
完整性验证清单:
- 所有子问题的研究发现都有3个及以上来源引用?
- 已识别并解释矛盾?(如无矛盾,明确说明"未发现矛盾")
- 包含近期来源(6-12个月内)?
- 优先使用权威来源(官方文档)?
- 提供了实用建议(3个关键 + 3-4个重要 + 2-3个可选)?
- 明确记录了研究空白?
自动化空白检测逻辑:
python
gaps = []
completeness_score = 100Check citation coverage
检查引用覆盖情况
for sub_q in sub_questions:
citation_count = count_citations(sub_q)
if citation_count < 3:
gaps.append(f"Sub-Q{i}: Only {citation_count} citations (need 3+)")
completeness_score -= 10
for sub_q in sub_questions:
citation_count = count_citations(sub_q)
if citation_count < 3:
gaps.append(f"子问题{i}:仅{citation_count}个引用(需要3个及以上)")
completeness_score -= 10
Check for contradictions exploration
检查是否探讨了矛盾
if contradictions_section_empty():
gaps.append("No contradictions explored - search for '{topic} criticisms' OR '{topic} limitations'")
completeness_score -= 10
if contradictions_section_empty():
gaps.append("未探讨矛盾 - 搜索'{topic} criticisms' OR '{topic} limitations'")
completeness_score -= 10
Check authoritative source coverage
检查权威来源覆盖情况
auth_sources = count_authoritative_sources() # credibility >= 8
if auth_sources < total_sources * 0.5:
gaps.append(f"Only {auth_sources} authoritative sources ({round(auth_sources/total_sources*100)}%) - need 50%+")
completeness_score -= 10
auth_sources = count_authoritative_sources() # 可信度 >=8
if auth_sources < total_sources * 0.5:
gaps.append(f"仅{auth_sources}个权威来源(占{round(auth_sources/total_sources*100)}%)- 需要50%+")
completeness_score -= 10
Check recency
检查时效性
recent_sources = count_recent_sources() # within 6 months
if recent_sources < total_sources * 0.3:
gaps.append(f"Only {recent_sources} recent sources ({round(recent_sources/total_sources*100)}%) - need 30%+")
completeness_score -= 5
recent_sources = count_recent_sources() # 6个月内
if recent_sources < total_sources * 0.3:
gaps.append(f"仅{recent_sources}个近期来源(占{round(recent_sources/total_sources*100)}%)- 需要30%+")
completeness_score -= 5
Check recommendation depth
检查建议深度
if critical_recommendations < 3:
gaps.append(f"Only {critical_recommendations} Critical recommendations (need 3)")
completeness_score -= 10
if critical_recommendations < 3:
gaps.append(f"仅{critical_recommendations}个关键建议(需要3个)")
completeness_score -= 10
Check for research gaps section
检查研究空白小节
if research_gaps_section_missing():
gaps.append("Research Gaps section missing - document what wasn't found")
completeness_score -= 5
return completeness_score, gaps
**Re-Query Decision Logic**:
```python
iteration_count = 1
completeness_score, gaps = validate_completeness()if research_gaps_section_missing():
gaps.append("研究空白小节缺失 - 记录未找到的内容")
completeness_score -= 5
return completeness_score, gaps
**重新查询决策逻辑**:
```python
iteration_count = 1
completeness_score, gaps = validate_completeness()🔴 MANDATORY: Always perform minimum 2 iterations
🔴 必须:至少执行2次迭代
Even if iteration 1 achieves 85%+, iteration 2 improves depth
即使迭代1达到85%+,迭代2也能提升深度
if iteration_count < 2 or (completeness_score < 85% and iteration_count <= 5):
# Generate targeted re-queries for each gap
requery_list = []
for gap in gaps:
if "citations" in gap:
# Need more sources for specific sub-question
requery_list.append(f"'{sub_question_topic}' 'detailed guide' OR 'comprehensive overview'")
elif "contradictions" in gap:
# Need to explore downsides/criticisms
requery_list.append(f"'{topic}' 'criticism' OR 'limitations' OR 'downsides'")
requery_list.append(f"'{topic}' 'vs' 'alternative' 'when not to use'")
elif "authoritative" in gap:
# Need more official sources
requery_list.append(f"site:docs.{vendor}.com '{topic}' 'official'")
requery_list.append(f"site:{vendor}.com '{topic}' 'documentation'")
elif "recent" in gap:
# Need more recent sources
requery_list.append(f"'{topic}' 'updates' OR 'changes' after:2024")
requery_list.append(f"'{topic}' '2025' OR '2024' 'latest'")
# Execute re-queries in parallel batch (1-5 queries)
# Use smaller batch size for re-queries since they're targeted
requery_batch = requery_list[:5] # Up to 5 re-queries
# Execute ALL re-queries in batch SIMULTANEOUSLY in single message
# Example: If requery_batch = [rq1, rq2, rq3], call:
# WebSearch(rq1)
# WebSearch(rq2)
# WebSearch(rq3)
# ALL THREE in the SAME message as parallel tool uses
execute_parallel_batch(requery_batch)
iteration_count += 1
# Update findings incrementally
append_iteration_findings()
completeness_score, gaps = validate_completeness()else:
# Either complete (≥85%) or max iterations reached
if completeness_score < 85%:
note_limitations_in_research_gaps_section(gaps)
finalize_output()
**Iteration Update Pattern**:
When adding findings from later iterations, append to existing sections:
```markdownif iteration_count < 2 or (completeness_score < 85% and iteration_count <= 5):
# 为每个空白生成针对性的重新查询
requery_list = []
for gap in gaps:
if "citations" in gap:
# 特定子问题需要更多来源
requery_list.append(f"'{sub_question_topic}' 'detailed guide' OR 'comprehensive overview'")
elif "contradictions" in gap:
# 需要探索缺点/批评
requery_list.append(f"'{topic}' 'criticism' OR 'limitations' OR 'downsides'")
requery_list.append(f"'{topic}' 'vs' 'alternative' 'when not to use'")
elif "authoritative" in gap:
# 需要更多官方来源
requery_list.append(f"site:docs.{vendor}.com '{topic}' 'official'")
requery_list.append(f"site:{vendor}.com '{topic}' 'documentation'")
elif "recent" in gap:
# 需要更多近期来源
requery_list.append(f"'{topic}' 'updates' OR 'changes' after:2024")
requery_list.append(f"'{topic}' '2025' OR '2024' 'latest'")
# 并行批量执行重新查询(1-5个查询)
# 重新查询使用更小的批量,因为它们是针对性的
requery_batch = requery_list[:5] # 最多5个重新查询
# 在单个消息中同时执行所有重新查询
# 示例:如果requery_batch = [rq1, rq2, rq3],调用:
# WebSearch(rq1)
# WebSearch(rq2)
# WebSearch(rq3)
# 全部三个在同一条消息中并行调用工具
execute_parallel_batch(requery_batch)
iteration_count += 1
# 增量更新研究发现
append_iteration_findings()
completeness_score, gaps = validate_completeness()else:
# 要么已完成(≥85%),要么达到最大迭代次数
if completeness_score < 85%:
note_limitations_in_research_gaps_section(gaps)
finalize_output()
**迭代更新模式**:
当添加后续迭代的研究发现时,追加到现有小节:
```markdown1. {Sub-Question}
1. {子问题}
{Original findings from iteration 1}
Iteration 2 Additions:
{New findings from re-queries, with citations [Org: Topic], [Org: Topic], [Org: Topic]}
Key Insights:
- {Original insight 1} [Org: Topic]
- {Original insight 2} [Org: Topic]
- {NEW insight from iteration 2} [Org: Topic], [Org: Topic]
**When to Stop Iterating**:
- 🔴 **MANDATORY**: Minimum 2 iterations (iteration_count >= 2)
- ✅ Completeness score ≥ 85%
- ✅ All sub-questions have 3+ citations
- ✅ Contradictions section populated (or explicitly noted as "None identified")
- ✅ 50%+ authoritative sources, 30%+ recent sources
- ✅ 3+ Critical recommendations
- ⏱️ OR iteration_count > 5 (max iterations reached)
**Stop only if**: (iteration_count >= 2 AND completeness >= 85%) OR iteration_count > 5
**If Max Iterations Reached Without 85%**:
Add explicit Research Gaps section:
```markdown{原始研究发现}
迭代2新增内容:
{重新查询得到的新发现,带引用[机构: 主题]、[机构: 主题]、[机构: 主题]}
关键洞察:
- {原始洞察1}[机构: 主题]
- {原始洞察2}[机构: 主题]
- {迭代2的新洞察}[机构: 主题]、[机构: 主题]
**停止迭代的时机**:
- 🔴 **必须**:至少2次迭代(iteration_count >= 2)
- ✅ 完整性评分≥85%
- ✅ 所有子问题都有3个及以上引用
- ✅ 矛盾小节已填充(或明确说明"未识别到矛盾")
- ✅ 50%+权威来源,30%+近期来源
- ✅ 3个及以上关键建议
- ⏱️ 或iteration_count >5(达到最大迭代次数)
**仅在以下情况停止**:(iteration_count >=2 且 完整性≥85%) 或 iteration_count >5
**如果达到最大迭代次数但完整性<85%**:
添加明确的研究空白小节:
```markdownResearch Gaps
研究空白
Due to iteration limit, the following gaps remain:
- {Gap 1}: {What's missing and why it matters}
- {Gap 2}: {What's missing and suggested follow-up approach}
undefined由于迭代次数限制,仍存在以下空白:
- {空白1}:{缺失内容及其重要性}
- {空白2}:{缺失内容及建议的后续研究方法}
undefinedExamples
示例
Example 1: Architecture Decision Research
示例1:架构决策研究
Scenario: User asks "What's the best architecture for integrating Salesforce with SQL Server in 2025?"
Process:
Phase 1 - Decomposition:
Sub-Q1: Salesforce integration capabilities (2025)?
Sub-Q2: SQL Server integration patterns?
Sub-Q3: Middleware options?
Sub-Q4: Security considerations?
Sub-Q5: Scalability factors?Phase 2 - Multi-Query Generation and Batched Execution:
Generated 25 queries across 5 sub-questions
Batch 1 (5 queries - executed in parallel):
WebSearch("site:salesforce.com 'API' 'integration' '2025'")
WebSearch("'Salesforce REST API' 'rate limits' after:2024")
WebSearch("'Salesforce Bulk API 2.0' 'best practices'")
WebSearch("filetype:pdf 'Salesforce integration guide' 2025")
WebSearch("'Salesforce API' 'breaking changes' after:2024")
→ Batch completes in ~1s, 5 results returned
Batch 2 (5 queries - executed in parallel):
WebSearch("'SQL Server ETL' 'best practices' 'real-time'")
WebSearch("site:docs.microsoft.com 'SQL Server' 'integration'")
WebSearch("'SQL Server Always On' 'high availability'")
WebSearch("'SQL Server CDC' 'change data capture'")
WebSearch("'SQL Server linked servers' 'performance'")
→ Batch completes in ~1s, 5 results returned
Batch 3-5 (15 more queries across 3 batches):
... (middleware, security, scalability queries)
→ Each batch completes in ~1s
Execution Time:
- 5 batches × ~1s each = ~5s total
- Sequential would be: 25 queries × 1s = 25s
- Speedup: 5x fasterPhase 3 - Evidence:
18 sources identified
12 ranked as authoritative (credibility ≥ 8)
3 contradictions (real-time vs batch approaches)Phase 4 - Citations:
[1] Salesforce API Guide (Cred: 10, Fresh: 10, Rel: 10, Overall: 10.0)
[2] MuleSoft Patterns (Cred: 9, Fresh: 8, Rel: 9, Overall: 8.9)Phase 5 - Output:
Executive Summary: 2 paragraphs
Findings: 5 sub-sections with 28 citations
Recommendations: 3 critical, 4 important, 2 enhancementsPhase 6 - Refinement:
Iteration 1: Identified gap in disaster recovery
Iteration 2: Re-queried "Salesforce SQL backup strategies"
Iteration 3: Completeness 92% → finalizedOutput: Deep Mode Context File with executive summary, 5 sub-question analyses, evidence table, synthesis, pros/cons, 28 citations
场景:用户提问"2025年将Salesforce与SQL Server集成的最佳架构是什么?"
流程:
阶段1 - 分解:
子问题1:Salesforce的集成能力(2025)?
子问题2:SQL Server的集成模式?
子问题3:中间件选项?
子问题4:安全考虑因素?
子问题5:可扩展性因素?阶段2 - 多查询生成与批量执行:
为5个子问题生成25个查询
批次1(5个查询 - 并行执行):
WebSearch("site:salesforce.com 'API' 'integration' '2025'")
WebSearch("'Salesforce REST API' 'rate limits' after:2024")
WebSearch("'Salesforce Bulk API 2.0' 'best practices'")
WebSearch("filetype:pdf 'Salesforce integration guide' 2025")
WebSearch("'Salesforce API' 'breaking changes' after:2024")
→ 批次约1秒完成,返回5个结果
批次2(5个查询 - 并行执行):
WebSearch("'SQL Server ETL' 'best practices' 'real-time'")
WebSearch("site:docs.microsoft.com 'SQL Server' 'integration'")
WebSearch("'SQL Server Always On' 'high availability'")
WebSearch("'SQL Server CDC' 'change data capture'")
WebSearch("'SQL Server linked servers' 'performance'")
→ 批次约1秒完成,返回5个结果
批次3-5(3个批次共15个查询):
...(中间件、安全、可扩展性查询)
→ 每个批次约1秒完成
执行时间:
- 5个批次 × 约1秒 = 总计约5秒
- 顺序执行时间:25个查询 ×1秒=25秒
- 提速:5倍阶段3 - 证据:
识别到18个来源
12个被评为权威来源(可信度≥8)
3个矛盾点(实时 vs 批量方案)阶段4 - 引用:
[1] Salesforce API指南(可信度:10,时效性:10,相关性:10,整体:10.0)
[2] MuleSoft模式(可信度:9,时效性:8,相关性:9,整体:8.9)阶段5 - 输出:
执行摘要:2段
研究发现:5个子小节,共28个引用
建议:3个关键、4个重要、2个优化建议阶段6 - 优化:
迭代1:识别到灾难恢复方面的空白
迭代2:重新查询"Salesforce SQL备份策略"
迭代3:完整性评分92% → 最终确定输出:深度模式上下文文件,包含执行摘要、5个子问题分析、证据表、信息整合、优缺点、28个引用
Example 2: Technology Selection Research
示例2:技术选型研究
Scenario: "Should we use microservices or monolith architecture for our e-commerce platform?"
Process:
Decomposition:
1. Scalability characteristics for e-commerce?
2. Team size and DevOps implications?
3. Transaction patterns differences?
4. Deployment complexity trade-offs?
5. Real-world e-commerce case studies?Multi-Query (sample):
"microservices e-commerce" "scalability" after:2024
"monolith vs microservices" "team size" "best practices"
site:aws.amazon.com "e-commerce architecture" "patterns"Evidence Synthesis:
15 sources (10 authoritative)
Consensus: Team size <20 → monolith, >50 → microservices
Contradiction: Database approach (shared vs distributed)Output: Structured analysis with pros/cons for both approaches, team size recommendations, migration considerations, case studies with citations
场景:"我们的电商平台应该使用微服务还是单体架构?"
流程:
分解:
1. 电商平台的可扩展性特征?
2. 团队规模与DevOps影响?
3. 事务模式差异?
4. 部署复杂度权衡?
5. 实际电商案例研究?多查询(示例):
"microservices e-commerce" "scalability" after:2024
"monolith vs microservices" "team size" "best practices"
site:aws.amazon.com "e-commerce architecture" "patterns"证据整合:
15个来源(10个权威来源)
共识:团队规模<20人→单体架构,>50人→微服务
矛盾:数据库方案(共享 vs 分布式)输出:结构化分析,包含两种方案的优缺点、团队规模建议、迁移注意事项、带引用的案例研究
Best Practices
最佳实践
- Start Broad, Then Narrow: Begin with general queries, then drill into specifics based on initial findings
- Verify Across Sources: Never rely on single source - cross-reference critical claims with 3+ sources
- Prioritize Recency: For technology topics, prefer sources <1 year old
- Official Docs First: Start with official documentation, then supplement with community insights
- Track Contradictions: Don't hide conflicting information - present it with context
- Iterate When Needed: Don't force completeness - if gaps remain after 5 iterations, note limitations
- Citation Discipline: Every factual claim needs a numbered citation
- 先宽后窄:从通用查询开始,再根据初始研究发现深入细节
- 跨源验证:绝不依赖单一来源 - 关键声明需与3个及以上来源交叉验证
- 优先时效性:对于技术主题,优先选择发布时间<1年的来源
- 官方文档优先:从官方文档开始,再补充社区见解
- 跟踪矛盾:不要隐藏冲突信息 - 结合背景呈现双方观点
- 按需迭代:不要强行追求完整性 - 如果5次迭代后仍有空白,记录局限性
- 引用规范:每个事实性声明都需要编号引用
Common Patterns
常见模式
Pattern 1: Architecture Decision Research
模式1:架构决策研究
- Decompose into: Current state, Requirements, Options, Trade-offs, Case studies
- Multi-query: Official docs, vendor comparisons, real-world implementations
- Synthesize: Pros/cons matrix with cited evidence
- 分解为:当前状态、需求、选项、权衡、案例研究
- 多查询:官方文档、供应商对比、实际实现
- 整合:带引用证据的优缺点矩阵
Pattern 2: Technology Migration Research
模式2:技术迁移研究
- Decompose into: Current tech assessment, Target tech capabilities, Migration path, Risk analysis, Timeline estimation
- Multi-query: Migration guides, success/failure stories, tool comparisons
- Synthesize: Step-by-step migration plan with risk mitigation
- 分解为:当前技术评估、目标技术能力、迁移路径、风险分析、时间线估算
- 多查询:迁移指南、成功/失败案例、工具对比
- 整合:带风险缓解的分步迁移计划
Pattern 3: Best Practices Research
模式3:最佳实践研究
- Decompose into: Industry standards, Common patterns, Anti-patterns, Tooling, Case studies
- Multi-query: Official guidelines, expert blogs, conference talks, GitHub repos
- Synthesize: Consolidated best practices list with rationale
- 分解为:行业标准、常见模式、反模式、工具、案例研究
- 多查询:官方指南、专家博客、会议演讲、GitHub仓库
- 整合:带理由的整合最佳实践列表
Troubleshooting
故障排除
Issue 1: Too Many Sources, Can't Synthesize
- Focus on top-ranked sources (overall score ≥ 7.0)
- Group findings by theme, not by source
- Identify consensus first, then note outliers
Issue 2: Contradictory Information
- Check publication dates (newer may reflect recent changes)
- Assess source authority (official > blog)
- Look for context (contradictions may be scenario-dependent)
- Present both views with citations
Issue 3: Insufficient Recent Sources
- Broaden date range to last 2 years
- Check for technology name changes (old vs new terminology)
- Combine recent + authoritative older sources
- Note in output: "Based on 2023 sources; 2025 updates pending verification"
Issue 4: Completeness Score Below 85%
- Identify specific gaps (which sub-questions lack depth?)
- Generate 1-3 targeted re-queries
- If still below 85% after 3 iterations, note limitations explicitly
问题1:来源过多,无法整合
- 聚焦于排名靠前的来源(整体评分≥7.0)
- 按主题分组研究发现,而非按来源
- 先识别共识,再记录异常值
问题2:信息矛盾
- 检查发布日期(较新的来源可能反映了近期变化)
- 评估来源权威性(官方>博客)
- 查找背景信息(矛盾可能因场景不同而存在)
- 带引用呈现双方观点
问题3:近期来源不足
- 将日期范围扩大到过去2年
- 检查技术名称变化(新旧术语)
- 结合近期来源与权威旧来源
- 在输出中说明:"基于2023年来源;2025年更新待验证"
问题4:完整性评分低于85%
- 识别具体空白(哪些子问题深度不足?)
- 生成1-3个针对性的重新查询
- 如果3次迭代后仍低于85%,明确记录局限性
Integration Points
集成点
- WebSearch Tool: Execute all search queries through WebSearch
- Context7 MCP: Supplement with official framework/library docs when applicable
- Evidence Table: Track all sources in structured format for quality assessment
- Context Files: Persist findings to
.agent/Session-{name}/context/research-web-analyst.md
- WebSearch工具:通过WebSearch执行所有搜索查询
- Context7 MCP:适用时补充官方框架/库文档
- 证据表:以结构化格式跟踪所有来源,用于质量评估
- 上下文文件:将研究发现持久化到
.agent/Session-{name}/context/research-web-analyst.md
Key Terminology
关键术语
- Sub-Question: Focused component of primary research question
- Query Variation: Different phrasing/angle of same information need
- Source Quality Score: Composite metric (credibility + freshness + relevance)
- Consensus View: Finding supported by 3+ independent authoritative sources
- Contradiction: Conflicting claims from multiple sources requiring context
- Completeness Score: Percentage of research objectives met with adequate evidence
- Iteration: Research cycle (query → collect → synthesize → validate)
- 子问题:核心研究问题的聚焦组件
- 查询变体:同一信息需求的不同表述/角度
- 来源质量评分:综合指标(可信度 + 时效性 + 相关性)
- 共识观点:得到3个及以上独立权威来源支持的研究发现
- 矛盾:多个来源的冲突声明,需要背景解释
- 完整性评分:研究目标通过充分证据达成的百分比
- 迭代:研究周期(查询 → 收集 → 整合 → 验证)
Additional Resources
额外资源
- Advanced Google Search Operators: https://ahrefs.com/blog/google-advanced-search-operators/
- Source Evaluation Criteria: https://guides.library.cornell.edu/evaluate
- Citation Best Practices: https://apastyle.apa.org/
- Research Synthesis Methods: https://methods.sagepub.com/book/systematic-approaches-to-a-successful-literature-review