推测智能体编程中的不确定性方法
How to Speculate about Uncertainty in Agentic Coding? A Draft-Model Gate Method
开源团队提出新方法,让AI编程助手提前预测错误,在Qwen和Claude上都有效果。
研究人员提出推测不确定性(SU)方法,通过开放权重小模型评估大模型生成的代码轨迹。该方法在Qwen3-Coder-480B和Claude 3.5 Sonnet上测试,将执行错误率降低6-8个百分点,减少14-19%的令牌成本。该方法无需访问logits、权重或激活值,适用于分布外基准测试。
How to Speculate about Uncertainty in Agentic Coding? A Draft-Model Gate Method
LLM agents deployed for software engineering fail expensively: they act confidently wrong, and bad actions are recognized only after costly execution and retry. We present Speculative Uncertainty (SU), a method that recovers a predictive failure signal for a black-box agent from its output tokens alone, with no access to logits, weights, activations, or repeated sampling. Inverting speculative decoding, a small open-weight draft model scores the agent's already-generated trajectory in a single forward pass. From these speculative cross-likelihoods we extract phase-aware features by separating the reasoning and action spans, and calibrate them against a verifiable objective. SU produces a failure-likelihood score that any downstream policy, such as routing, human intervention, or extra test-time compute, can consume directly. To show the signal is actionable, we instantiate one such policy, a pre-execution veto gate, on software engineering agents Qwen3-Coder-480B and closed-source Claude 3.5 Sonnet, cutting execution error rate by 6-8 percentage points and token cost by 14-19% in deployment, transferring to out-of-distribution benchmarks without retraining, and generalizing across agent models.