Contract
Input Contract
- Type: natural language query or structured search request
- Required fields:
query: user question or goal
- Optional fields:
context: conversation contextfilters: time range, tags, project scope, source preference, etc.max_results: default 10, range 1-20search_depth:quick | standard | deep(defaultstandard)source_mode:notes_only | web_only | hybrid(defaulthybrid)
- Validation rules:
querylength >= 2- When the question contains "latest/today/recent", etc., the web timeliness check must be enabled
Output Contract
- Type: structured retrieval results + readable conclusions
- Guaranteed fields:
results: result list (sorted by overall relevance)search_dimensions: retrieval dimensions actually executedevidence: evidence list (note evidence + external evidence)confidence: confidence level for each key conclusion (High/Medium/Low or 0-100)conflicts: conflicting information or unresolved points
- Constraints:
- Conclusions must be traceable to evidence sources
- Distinguish between "confirmed" and "to be verified"
- Clearly state which conclusions come from notes and which come from external web sources
Error Handling
- Invalid query → return optimization suggestions, do not fail directly
- No matching results → automatically relax constraints once and retry; if there are still no results, return "insufficient evidence"
- Tool failure → return available partial results + unfinished items
- Insufficient authoritative sources → degrade output, do not give definitive conclusions
Core principles
- Deep search is not single-round keyword matching, but a "heuristic funnel + evidence convergence".
- Unless the user explicitly requests "search notes only", use
hybridby default (notes + authoritative web sources). - External sources must be traceable,
web_searchsummaries can only serve as clues,web_fetchonly the main text can serve as evidence. - It is strictly prohibited to fabricate sources, fabricate citations, or treat a single low-authority source as a definitive conclusion.
- This version enforces serial execution with a single agent and prohibits calling
sub_agent。 - This Skill is a read-only retrieval process and does not call note-writing tools.
Relationship with wps-note
This Skill is wps-note 's deep retrieval scenario encapsulation layer:
- Reuses underlying capabilities: search, locate, read, tag aggregation
- Adds intelligent capabilities: heuristic expansion, evidence fusion, confidence evaluation
- Adds external capabilities: authoritative web source retrieval and cross-validation
Tool list and invocation methods
Note-side tools (read-only)
| Tool name | Purpose |
|---|---|
search_notes |
Note-level recall (title/body/tag dimensions) |
search_note_content |
Locate key paragraphs within a single note |
get_note_info |
Retrieve metadata (title, tags, update time) |
find_tags |
Tag expansion and synonym aggregation |
get_note_outline |
Retrieve structure and locate reading entry points |
read_section |
Chapter-level close reading |
read_blocks |
Precise re-reading of evidence blocks |
read_note / read_note_content |
Full-text reading (host tool name compatible) |
Network-side tools (read-only)
| Tool name | Purpose |
|---|---|
web_search |
Single-query retrieval of authoritative candidates |
batch_web_search |
Multi-query parallel recall (recommended) |
web_fetch |
Fetch full text to form citable evidence |
Disabled tools
sub_agent(Prohibited for use by this Skill)
Authoritative source tiering (mandatory)
| Tier | Definition | Role in conclusions |
|---|---|---|
| Tier 1 (primary official) | Government/regulatory/standards organizations/company official disclosures/original institutional releases | Primary anchor for conclusions |
| Tier 2 (secondary mainstream) | Mainstream media, leading research institutions, sources with traceable authors and publication times | Cross-validation |
| Tier 3 (tertiary supplementary) | Communities, self-media, secondary reposts, opinion pieces | Clues and background, not sufficient on their own for conclusions |
Rules:
- Key conclusions prioritize Tier 1; when there is no Tier 1, there must be at least 2 independent Tier 2 sources.
- With only Tier 3, output only "exploratory judgment/insufficient evidence".
Heuristic Funnel
Layer 1: Intent Clarification
Goal: turn the user's question into a retrievable task.
- Identify task type: fact-checking/relationship mining/trend judgment/decision recommendation
- Extract structured elements:
实体、时间窗、约束、输出目标 - Set source_mode:
notes_only | web_only | hybrid - Clarify obvious ambiguity at most once; otherwise proceed based on conservative assumptions and state the assumptions
Layer 2: Candidate Expansion
Goal: fully recall first, then converge with high quality.
- Synonym expansion: alternative names, abbreviations/full names, Chinese and English terms
- Reverse-term expansion: search positive and negative signals together to reduce one-sided bias
- Time anchor expansion: convert relative time to absolute time, and add a comparison window
- Entity relationship expansion: upstream and downstream, competitors, regulators, partners, persons in charge
- Context expansion: prioritize project names/internal terminology from the user's notes
Layer 3: Evidence Convergence
Goal: make every conclusion auditable.
- Extract evidence units: claim, evidence snippet, source, time, scope of applicability
- Independent cross-validation: key claims require corroboration from multiple sources
- Preserve conflicts: mark points of dispute, do not force consolidation
- Output confidence: high/medium/low, and explain the reasons
Workflow (serial)
Step 0: Mode selection
- User explicitly says "only look at notes" →
notes_only - User emphasizes "latest/external developments/authoritative statements" →
hybrid(orweb_only) - When unspecified, default to
hybrid
Step 1: Break the question down into claims
Break the question into verifiable assertions (claims); each claim must contain at least:
subjectpredicatetime_scope
Step 2: Plan retrieval and budget
- Each claim defaults to 2 rounds of web search
- Each claim defaults to fetching at most 6 pages
- Early stopping conditions:
- Already have 1 Tier 1 + 1 independent Tier 2
- Or already have 2 independent Tier 2 sources that are consistent
Step 3: Note-side retrieval (serial)
search_notes/find_tagsRecall candidate notessearch_note_contentLocate key passagesread_section/read_blocksExtract evidence
Step 4: Web-side retrieval (serial)
batch_web_searchPerform multi-query expansion recallweb_fetchFetch full text and filter out abstract-only results- Keep candidates in the order Tier 1 → Tier 2 → Tier 3
Step 5: Evidence fusion and scoring
Suggested composite score (0-100):
- Intent match (30)
- Evidence strength (25)
- Source authority (20)
- Timeliness match (15)
- Cross-source consistency (10)
Confidence suggestions:
- High: >= 80 and meets authoritative source conditions
- Medium:60-79
- Low: < 60 or major conflicts exist
Step 6: Result presentation (source transparency)
Must include:
- Query topic and retrieval time
- Conclusion summary
- Claim-level judgment (supported / partially_supported / conflicting / insufficient_evidence)
- Note evidence (note_id / location / summary)
- External evidence (Tier, source name, URL, publication time, fetch time, role of evidence)
- Conflicts and unresolved issues
Common orchestration patterns
Pattern 1: Fact-checking (default hybrid)
Applicable to "Is this true / what is the latest official position":
claim 拆解 → 笔记检索 → 网络检索 → 证据收敛 → 置信度输出
Pattern 2: Cross-note association + external verification
Applicable to "How does this topic relate to my past notes, and what do external sources say":
笔记召回 → 主题扩展 → 网络权威检索 → 一致性分析
Pattern 3: Trend assessment
Applicable to "Recent trends / risk changes":
时间锚点扩展 → 多时间窗检索 → 证据对比 → 趋势结论
Examples
Example 1: Fact-checking
Input:深度搜索:某 AI 公司最近是否发布了新的企业定价政策?
Execution points:
- Claim decomposition: whether released / release time / scope involved
- Serially execute official source + mainstream media retrieval
- Look back at historical pricing discussions in the user's notes
- Output claim-level evidence, confidence, and conflict points
Example 2: Association mining
Input:深度搜索:把“模型成本压降”相关的内部笔记和外部权威资料一起梳理
Execution points:
- Note-side recall of project retrospectives, budgets, and procurement notes
- External-side retrieval of regulatory/vendor official documents and mainstream industry reports
- Output alignment and deviations between "internal views vs. external evidence"
Troubleshooting
Web results are empty
- Relax terminology precision or expand the time window and retry once
- If still empty, explicitly return "no verifiable evidence retrieved"
Too many results
- Tighten entity and time anchors
- Keep only high-scoring candidates and explain the filtering rationale
Source conflict
- Keep both versions of the conclusion
- Mark
conflicting, and give points to be confirmed
No Tier 1/Tier 2
- Mark
insufficient_evidence - Do not output a definitive judgment; only provide clues and next-step suggestions
Page cannot be fetched
web_searchResults are for clues only- Without
web_fetchcannot serve as final evidence without the body text
Timeliness risk
- When the user asks for the "latest", the publication time and crawl time must be displayed
- If it exceeds the timeliness window, an explicit "may be outdated" warning must be shown
Result quality red lines
- A "guess" must not be written as a "fact"
- Source links and time information must not be omitted
- Clearly conflicting evidence must not be ignored
- A single tertiary source must not be treated as the final basis