Systematically review and improve AI agent reliability — identify failure patterns, assess error handling, design safeguards, and set reliability targets. Use when agents are producing inconsistent results, after incidents, or when preparing for production deployment.
التثبيت
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Systematically review and improve AI agent reliability — identify failure patterns, assess error handling, design safeguards, and set reliability targets. Use when agents are producing inconsistent results, after incidents, or when preparing for production deployment.
Pattern: [description]
Frequency: [how often]
Root Cause: [why it happens]
Impact: [what goes wrong for the user]
Detection: [how we know it failed]
Recovery: [what happens after failure]
Step 4 — Safeguard Design
For each high-impact failure, design a safeguard:
Safeguard Type
When to Use
Example
Input Validation
Predictable bad inputs
Schema validation before execution
Output Validation
Format/content requirements
JSON schema check, range validation
Confidence Gate
Uncertain outputs
If confidence < 0.8, escalate to human
Retry with Backoff
Transient failures
Retry 3x with exponential backoff
Fallback Path
Critical failures
Switch to simpler model or manual flow
Circuit Breaker
Cascading failures
Stop after N consecutive failures
Step 5 — Reliability Target Setting
Level
Success Rate
Meaning
Appropriate For
Basic
90%
1 in 10 fails
Internal tools, non-critical
Standard
95%
1 in 20 fails
Regular business ops
High
99%
1 in 100 fails
Customer-facing, financial
Critical
99.9%
1 in 1000 fails
Safety, compliance
Current level: ___
Target level: ___
Step 6 — Improvement Roadmap
Prioritize by: Impact × Frequency × Ease of Fix
Quick Wins (this week):
- [ ] [safeguard 1]
- [ ] [safeguard 2]
Medium Term (this month):
- [ ] [improvement 1]
- [ ] [improvement 2]
Long Term (this quarter):
- [ ] [architecture change]
Output
Reliability report card:
Agent: [name]
Period: [date range]
Reliability: [current%] → Target: [target%]
Top Failure: [category] ([count] occurrences)
New Safeguards: [count] implemented
Next Review: [date]
Failure Handling
실패 상황
감지
대응
신뢰성 기준선 편향
"실패율 5%"라고 계산했으나 실패 정의가 팀마다 다름
실패의 정의를 formula로 명시화 (예: "응답이 0초 안에 없거나 오류 반환") → 재측정
Safeguard 성능 저하
Confidence gate 추가 → 정확도는 올랐지만 응답 불가율 15% 증가
임계값 조정 (confidence threshold 하향) 또는 fallback path 개선
특정 입력에만 실패
대부분의 요청은 성공하는데 특정 패턴(예: 특수문자 포함)에서만 오류
Input validation 강화, 실패 입력 타입별 분류, 패턴별 safeguard 설계
신뢰성 목표 달성 불가
99% 목표는 설정했으나 현재 95% → 4% gap을 닫을 방법 부족
1) 빠른 개선 가능한 것(Input validation) 먼저 시행 2) 장기 아키텍처 개선 분리
높은 영향도(High impact) 실패 각각에 대해 safeguard가 설계되었는가? (Yes/No)
신뢰성 목표 수준(Basic/Standard/High/Critical)이 비즈니스 요구와 정렬되었는가? (Yes/No)
현재 수준 → 목표 수준까지의 로드맵(Quick Wins, Medium Term, Long Term)이 명시되었는가? (Yes/No)
Examples
Good Example
신뢰성 리뷰: 내부 업무 효율화 에이전트
기준선 (30일):
├── 총 실행: 2,400건
├── 성공: 2,280건 (95%)
├── 실패: 120건 (5%)
└── 부분 성공: 0건
실패 분류:
| 카테고리 | 개수 | 원인 예시 | 심각도 |
|---------|------|---------|-------|
| Input Error | 30 | 잘못된 형식(JSON 미형성) | Low |
| Model Error | 60 | 환각, 형식 오류 | Medium |
| Tool Error | 20 | API timeout | High |
| Logic Error | 8 | 조건 검사 누락 | High |
| Output Error | 2 | 너무 긴 응답 | Low |
Safeguard 설계:
High Impact 3가지:
1. Model Error (60개) → Confidence gate (threshold 0.7)
- Expected: 실패 60→ 40 (667% 개선 예상 시간: 5일)
2. Tool Error (20개) → Retry with exponential backoff
- Expected: 실패 20→ 5 (timeout 복구율 75%)
3. Input Error (30개) → JSON schema validation
- Expected: 실패 30→ 2 (거의 전부 사전 차단)
목표 수준: High (99%)
- 현재: 95%
- 3주 후: 98% (safeguard 1,3 적용)
- 6주 후: 99% (safeguard 2까지 추가)
Bad Example
"에이전트의 신뢰성이 좋지 않은 것 같다"
❌ 문제점:
- "신뢰성"의 정의가 주관적 (기준선 없음)
- 실패 분류 없음 (어떤 실패가 몇 개인지 모름)
- Safeguard 미설계 (대응 방법 불명확)
- 목표 수준 미설정 (뭐가 "좋은" 신뢰성인지 불명확)
- 개선 로드맵 없음
→ 재작업: 기준선 수집 → 실패 분류 → 패턴 분석 → safeguard 설계 → 목표 설정 → 로드맵 수립
사전 위험 분석 (Pre-mortem)
배포 전 "이 에이전트가 3개월 후 완전히 실패했다고 가정하자. 왜 실패했을까?"로 시작하는 FMEA 체크리스트.
Pre-mortem Exercise
배포 전 최소 5개의 실패 시나리오를 도출한다:
"The agent failed because..."
1. ___ (모델 실패 — 환각, 컨텍스트 윈도우 오버플로우, prompt injection)
2. ___ (데이터 실패 — upstream API 변경, PII 유출, 데이터 드리프트)
3. ___ (통합 실패 — API rate limit, 인증 토큰 만료, 버전 불일치)
4. ___ (비즈니스 실패 — 비용 초과, 낮은 사용자 채택, 규제 위반)
5. ___ (운영 실패 — 모니터링 부재, 알림 미설정, 대응 절차 없음)