search-fail-pivot
Skill này làm gì
Skill này cho AI agent một quy tắc đơn giản để biết khi nào nên ngừng tìm kiếm web và chuyển sang việc khác. Nó dành cho những người muốn nhiệm vụ được hoàn thành thay vì bị kẹt ở các lỗi tìm kiếm lặp lại.
Khi nào nên dùng
- ✓Khi công cụ tìm kiếm trả về lỗi không rõ nguyên nhân hai lần liên tiếp với cùng hoặc các truy vấn tương tự.
- ✓Khi kết quả tìm kiếm trống hoặc bị từ chối truy cập sau nhiều lần thử.
- ✓Khi bạn cần soạn một tài liệu nhưng dữ liệu web mới không lấy được.
Liên kết skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/search-fail-pivot/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tìm các quy định mới nhất về cấp phép trông trẻ thú cưng. Nếu tìm kiếm liên tục lỗi, hãy tiếp tục với những gì bạn biết và nói rõ điều đó.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đếm số lần tìm kiếm thất bại liên tiếp. Sau hai lần thất bại với các truy vấn tương tự, nó dừng tìm kiếm, ghi lại những gì đã thử tìm và tiếp tục nhiệm vụ bằng kiến thức của mình.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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:
- Acknowledge the limitation: Note that external verification was attempted but unavailable
- Use established knowledge: Draw on training data for well-known facts, laws, cases, standards
- 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
Câu hỏi thường gặp
Lỗi nào được coi là có thể phục hồi?
Skill coi giới hạn tốc độ và thời gian chờ ngắn là có thể phục hồi, nên agent có thể thử lại một hoặc hai lần.
Agent có nói với tôi rằng nó đã không tìm kiếm không?
Có, skill yêu cầu agent thừa nhận rằng các kiểm tra bên ngoài không khả dụng.
Việc chuyển hướng có phải quyết định cuối cùng không?
Skill đặt giới hạn là hai lần thất bại, sau đó agent tiếp tục mà không tìm kiếm.
Chi tiết
Mô tả gốc của tác giả
Heuristic for detecting search tool failures and pivoting to domain knowledge for document generation
repo: HKUDS/AgentPilot
Độ phổ biến
- Sao GitHub
- 7.8k
- Vị trí xếp hạng
- #12994
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agentpilot
7.8kGiúp agent của bạn cải thiện dự án từng bước bằng cách chuẩn bị tác vụ và chạy vòng lặp AgentPilot, gồm đề xuất, kiểm thử và chấm điểm thay đổi.
openspace
7.8kGiúp agent của bạn thiết lập OpenSpace, công cụ lưu và lấy lại skill của agent, rồi kết nối nó với ứng dụng AI của bạn qua MCP.
rsi-arena
7.8kGiúp agent của bạn thiết lập và chạy các bài kiểm thử benchmark AI chuẩn, như AIME và Terminal-Bench, để so sánh các phương pháp cải tiến khác nhau.
experiment-guide
7.8kGiúp agent của bạn lên kế hoạch các thí nghiệm nhỏ, đọc kết quả và ghi lại phát hiện khi tìm cách cải thiện một chương trình.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.