TL;DR
AI agents, particularly those tasked with complex coding, are systematically overconfident in their ability to succeed, often predicting high success rates even when their actual success rate is low. This paper shows that while adversarial prompting to "find bugs" improves calibration, pre-execution assessment with less information can surprisingly offer better discrimination than post-execution checks.
What Problem Does This Paper Address?
As AI agents become more capable and are increasingly tasked with complex, multi-step workflows (like software development), it's crucial they can accurately assess their own likelihood of success. This "agentic uncertainty" is vital for safe and efficient deployment, allowing for early intervention, human oversight, or task rerouting. However, current AI agents often lack this self-awareness, leading to overconfidence where they might claim high success probabilities for tasks they are likely to fail. This paper investigates how well AI agents can predict their own success across different stages of task execution and explores methods to improve this crucial self-assessment capability.
Methods
The researchers developed an "uncertainty agent" that works alongside a task-solving agent. This uncertainty agent estimates the probability of success at three key points in the task lifecycle:
- Pre-Execution: The agent has only the task description and read-only access to the codebase. It must reason abstractly about the task's difficulty without attempting any solutions.
- Mid-Execution: The agent assesses progress at 25%, 50%, and 75% of the task's steps, using information from the partial trajectory.
- Post-Execution: The agent reviews a proposed patch and the modified codebase to assess if the task was successfully completed.
A key aspect is that the uncertainty agent uses the same underlying model as the task-solving agent, isolating the effect of information access. They also introduced an Adversarial Post-Execution variant, where the agent is prompted to actively "find bugs" rather than simply verify correctness. This reframes the task from confirmation to falsification.
Datasets
The experiments were conducted on 100 tasks sampled from SWE-bench Pro. This benchmark is noted for requiring substantial multi-file modifications and is challenging for current frontier models, with success rates around 23-44%.
Key Insights and Ideas
- Pervasive Overconfidence: AI agents are consistently overconfident, regardless of whether they are assessing before, during, or after execution. This isn't just a slight miscalibration; some agents succeeding only 22% of the time predict 77% success.
- Pre-Execution Advantage (for Discrimination): Counterintuitively, assessing success before any code is written, with strictly less information, often leads to better discrimination between success and failure compared to post-execution review. This suggests that seeing a "plausible-looking" patch can anchor agents on surface-level correctness rather than true task difficulty.
- Adversarial Framing Works: Prompting agents to "find bugs" instead of "verify correctness" significantly improves calibration and can recover discrimination capabilities, especially for models like Claude and Gemini. This reframing helps counteract confirmation bias.
- Mid-Execution Doubt is Uninformative: While agents' confidence tends to decrease during execution ("cold feet"), this doubt is not a reliable indicator of impending failure, as confidence tracks similarly for both successes and failures.
Key Results
- Overconfidence Gap: Post-execution agents showed significant overconfidence, with GPT predicting 73% success on tasks where its base rate was 35%, Gemini predicting 77% on tasks with a 22% base rate, and Claude predicting 61% on tasks with a 27% base rate.
- Discrimination: Pre-execution assessment achieved better discrimination (higher AUROC) than vanilla post-execution for GPT (0.62 vs. 0.58) and Claude (0.64 vs. 0.55).
- Calibration: Adversarial post-execution consistently achieved the best calibration across models, reducing ECE (Expected Calibration Error) significantly. For example, it reduced ECE for Claude from 0.37 to 0.24 (a 35% reduction).
- Adversarial Impact: Adversarial prompting reduced the rate of overconfident predictions on failing tasks from 72% to 45%. For Gemini and Claude, this adversarial shift also provided a more genuine "signal" by lowering confidence more on failing instances, thus improving discrimination.
Limitations and Future Work
- Sample Size: The study used 100 SWE-bench Pro tasks, with as few as 22 positive examples for Gemini. Future work should confirm findings with larger datasets.
- Domain Specificity: The experiments focused on coding tasks with objective success criteria. Overconfidence might manifest differently in domains with ambiguous or subjective success conditions (e.g., creative tasks, scientific workflows).
- Scaling Laws: The relationship between model scale and overconfidence remains unexplored.
- Deployment Strategies: The paper suggests combining pre-execution for task routing and adversarial post-execution for submission decisions, but the optimal combination and escalation strategies need further investigation.
- Multi-Agent Systems: Understanding how uncertainty propagates through complex multi-agent workflows is a critical future direction.
- Trained Verifiers: The current agents use prompting alone. Training verifiers explicitly for self-assessment, analogous to reward models, could be a promising avenue, though obtaining training signals for diverse tasks is a challenge.
Summary updated