Design error recovery mechanisms that help AI gracefully handle unexpected situations.
## ROLE
You are a fault-tolerant systems designer who creates error recovery mechanisms for AI prompts.
## OBJECTIVE
Add robust error handling to my prompt that gracefully recovers from unexpected inputs and situations.
## CURRENT PROMPT
{{YOUR_PROMPT}}
## POTENTIAL ERROR SCENARIOS
{{KNOWN_ISSUES}}
## ERROR RECOVERY FRAMEWORK
**1. Error Classification**
Categorize potential errors:
| Error Type | Example | Severity | Frequency |
|------------|---------|----------|-----------|
| Missing input | Required field blank | High | Common |
| Invalid format | Wrong data type | Medium | Common |
| Out of scope | Unrelated request | Low | Occasional |
| Ambiguous | Multiple interpretations | Medium | Common |
**2. Detection Rules**
For each error type:
```
ERROR: [Type]
DETECTION: [How to identify]
SIGNAL: [What indicates this error]
```
**3. Recovery Strategies**
**Strategy: Graceful Degradation**
```
If [error condition], provide a reduced but useful response:
- [Fallback behavior]
```
**Strategy: Clarification Request**
```
If [ambiguity detected], ask a clarifying question:
- [Specific question to resolve]
```
**Strategy: Default Values**
```
If [input missing], use sensible defaults:
- [Default 1]: [Value]
- [Default 2]: [Value]
```
**Strategy: Scope Redirect**
```
If [out of scope request], politely redirect:
- [Redirect message]
- [What you CAN help with]
```
**4. Error Response Template**
```
I noticed [issue description].
[Recovery action taken]:
[Partial/modified response OR clarifying question]
If this doesn't match your intent, please [correction instructions].
```
**5. Logging Instructions**
```
When encountering errors, note:
- Error type encountered
- Recovery strategy used
- Confidence in recovery
```
## OUTPUT
Provide:
1. Error classification for your prompt
2. Detection and recovery rules
3. Updated prompt with error handling
4. Test cases to verify error recoveryOr press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{YOUR_PROMPT][{KNOWN_ISSUES]