Graceful degradation workflow for continuing tasks when web search tools fail, using internal knowledge with verification caveats
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-search-fallback-workflow-739a9106c527 ,按照其中的说明把「search-fallback-workflow」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Use this workflow when:
search_web tool fails repeatedly (typically 2+ consecutive failures)Detect Search Failure
search_web responses for errors, empty results, or timeoutsAssess Feasibility
Proceed with Internal Knowledge
Flag for Verification
[VERIFICATION NEEDED: Search tool unavailable during generation]
Document Limitations
## Execution Notes
**Search Tool Status**: Unavailable during generation
**Confidence Levels**:
- ✓ High confidence: Established regulations, well-documented facts
- ⚠ Medium confidence: Industry standards, commonly accepted practices
- ✗ Requires verification: Time-sensitive data, recent changes, specific citations
**Verification Checklist**:
- [ ] Verify citation: [specific reference]
- [ ] Confirm current status: [specific item]
- [ ] Review recent updates: [specific topic]
# Pseudocode for search fallback detection
search_attempts = 0
max_search_attempts = 2
search_failed = False
for query in required_searches:
result = search_web(query)
if result.success:
process_result(result)
else:
search_attempts += 1
if search_attempts >= max_search_attempts:
search_failed = True
log_warning("Search tool unavailable, proceeding with fallback")
break
if search_failed:
# Apply graceful degradation
content = generate_with_internal_knowledge()
add_verification_flags(content)
document_limitations_in_summary()
When using this fallback, structure documents with clear sections:
# Document Title
## Disclaimer
This document was generated with limited access to external verification tools.
Items marked with [VERIFICATION NEEDED] should be confirmed before final use.
## Content Sections
[Standard content with internal knowledge]
## Items Requiring Verification
- Topic A: Current regulatory status needs confirmation
- Topic B: Recent policy changes should be checked
- Topic C: Specific citations require source validation
## Recommendations
1. Cross-reference with official sources
2. Verify time-sensitive information
3. Consult subject matter experts for critical decisions
citation-management: Handling references and sources in documentserror-recovery-workflow: General patterns for tool failure recoveryconfidence-annotation: Marking certainty levels in generated content