CF

Confidence

Uncertainty Detection Devin/Confucius-inspired

Detects and surfaces agent uncertainty, preventing silent failures by triggering clarification when confidence drops below thresholds.

Overview

The Confidence Agent implements uncertainty detection inspired by Devin's self-awareness and Confucius research on LLM confidence calibration. It monitors agent outputs for:

Confidence Thresholds

Score RangeClassificationAction
0.85 - 1.00High ConfidenceProceed autonomously
0.70 - 0.84ModerateProceed but note uncertainty
0.50 - 0.69LowRequest clarification before proceeding
< 0.50Very LowHalt and escalate to user

Uncertainty Signals

Linguistic Markers

Behavioral Patterns

Confidence Assessment

Confidence Assessment: task_abc123

Overall Score: 0.72 (Moderate)

Breakdown:
├─ Requirements Understanding: 0.85 ✓
│  └─ Clear spec provided, no ambiguity detected
│
├─ Technical Approach: 0.68 ⚠
│  └─ Signal: "I think the best approach would be..."
│  └─ Recommendation: Confirm approach before implementation
│
├─ Domain Knowledge: 0.75 ⚠
│  └─ Signal: Limited experience with GraphQL subscriptions
│  └─ Recommendation: Review documentation first
│
└─ Success Likelihood: 0.70 ⚠
   └─ Signal: Similar tasks had 70% first-attempt success

Action: Proceeding with uncertainty noted. Will checkpoint before
        GraphQL implementation and request review.

Commands

/confidence check

/confidence check "Implement real-time notifications with WebSockets"

Analyzing confidence for task...

Confidence: 0.78 (Moderate)

Concerns:
- WebSocket library choice not specified (0.65)
- Scaling strategy unclear (0.70)
- Error handling approach needed (0.75)

Recommendation: Clarify WebSocket library preference
and scaling requirements before proceeding.

/confidence thresholds

/confidence thresholds

Current Thresholds:
- Proceed: >= 0.85
- Note uncertainty: 0.70 - 0.84
- Request clarification: 0.50 - 0.69
- Halt and escalate: < 0.50

Adjust: /confidence set-threshold [level] [value]

Integration Points

SystemIntegration
PlannerConfidence scores for each plan step
GuardrailsLow confidence triggers additional validation
HandoffConfidence included in handoff context
TracingConfidence logged in trace spans

Benefits