跳到正文
Skillpedia
智能体7.8k · #12994

search-fail-pivot

它能做什么

这项技能为 AI 智能体提供了一条简单的规则:何时停止网络搜索并继续推进。它适合希望任务能完成、而不是卡在反复搜索错误上的人。

适用场景

  • ✓当搜索工具对相同或相似的查询连续两次返回未知错误的时候。
  • ✓当反复尝试后搜索结果为空或访问被拒绝的时候。
  • ✓当你需要制作文档,而最新的网络数据无法获取的时候。

技能链接

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/search-fail-pivot/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/search-fail-pivot/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请搜索关于狗狗日托执照的最新规定。如果搜索一直失败,就用你所知道的内容继续,并说明这一点。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会统计连续的搜索失败次数。对相似查询失败两次后,它会停止搜索,记录它尝试查找的内容,然后用自身知识继续完成任务。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Search Tool Failure Detection and Pivot Strategy

Purpose

When using search_web or similar external data retrieval tools, repeated failures waste iterations. This skill provides a diagnostic heuristic to recognize when to abandon search attempts and proceed with existing domain knowledge.

Core Heuristic

If search_web fails 2+ consecutive times with 'unknown error' or similar non-recoverable errors, pivot to domain knowledge + run_shell for document generation.

Do not attempt more than 2 retries on the same or similar queries before pivoting.

Step-by-Step Instructions

Step 1: Track Search Failures

Monitor search_web outcomes during your task:

  • Count consecutive failures (empty results, 'unknown error', timeout, access denied)
  • Note the error type - distinguish between:
    • Recoverable: Rate limiting, temporary timeout (retry 1-2 times)
    • Non-recoverable: 'unknown error', persistent empty results, access denied

Step 2: Apply the 2-Failure Rule

IF search_web failures >= 2 (same or similar queries)
THEN:
  1. Stop attempting search_web
  2. Document what information you attempted to retrieve
  3. Proceed with existing domain knowledge

Step 3: Pivot to Domain Knowledge

When pivoting:

  1. Acknowledge the limitation: Note that external verification was attempted but unavailable
  2. Use established knowledge: Draw on training data for well-known facts, laws, cases, standards
  3. Generate with run_shell: Create documents using Python/bash scripts rather than waiting for external data

Example pivot workflow:

# Instead of continuing search_web attempts:
# 1. Compile known information from domain knowledge
known_facts = {
    "law": "COPPA requirements for children's data",
    "precedent": "FTC v. Google/YouTube settlement patterns",
    "jurisdiction": "California privacy law framework"
}

# 2. Generate document directly
# Use run_shell with Python to create PDF/DOC

Step 4: Document Generation Pattern

When generating documents after pivoting:

# Use run_shell to execute document generation
# Example: Create legal memo with Python + reportlab
python << 'EOF'
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas

# Generate document with domain knowledge
c = canvas.Canvas("memo.pdf", pagesize=letter)
c.drawString(100, 750, "Legal Analysis based on established precedents")
# ... continue with known information
c.save()
EOF

When This Applies

This heuristic is particularly useful for:

Task Type Why It Applies
Legal research Case law and statutes are well-documented in training
Technical documentation Standards and best practices are established knowledge
Historical analysis Past events and data are in training corpus
Regulatory compliance Major regulations (GDPR, COPPA, HIPAA) are well-known

When NOT to Pivot

Do NOT apply this heuristic when:

  • You need current/time-sensitive data (stock prices, weather, news < 24hrs)
  • The task explicitly requires external verification
  • You have not yet attempted the search (first attempt should complete)
  • Errors are clearly recoverable (rate limit with retry-after header)

Example Decision Flow

Attempt search_web → Success? → Yes → Use results
                         ↓
                        No
                         ↓
            Is this failure #1? → Yes → Retry once with modified query
                         ↓
                        No (failure #2+)
                         ↓
            Pivot to domain knowledge + run_shell document generation

Benefits

  • Saves iterations: Avoids wasting 3-4 attempts on unavailable data
  • Maintains progress: Task continues instead of stalling on search
  • Leverages training: Uses the substantial knowledge already available
  • Clear handoff: Explicitly documents the pivot decision for transparency

Anti-Patterns to Avoid

❌ Continuing search_web attempts beyond 2 failures
❌ Not documenting why you pivoted from search
❌ Applying this to tasks requiring real-time data
❌ Abandoning search on first failure without retry

✅ Apply 2-failure rule consistently
✅ Document the pivot decision in your output
✅ Use run_shell efficiently after pivoting
✅ Distinguish recoverable vs non-recoverable errors

常见问题

什么算作可恢复的错误?

这项技能把速率限制和短暂超时视为可恢复的,因此智能体可能会重试一到两次。

智能体会告诉我它没有进行搜索吗?

会。这项技能要求智能体说明外部核查不可用。

这种转向是最终决定吗?

这项技能把两次失败设为上限,之后智能体会在不搜索的情况下继续。

详情

作者的原始描述

Heuristic for detecting search tool failures and pivoting to domain knowledge for document generation

repo: HKUDS/AgentPilot

热度

GitHub 星标
7.8k
排名
#12994
许可证
MIT
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能