Counterexamples as Feedback for Agent Self-Correction
Abstract
Single-turn code-generation metrics understate a central property of deployed agents: whether they can repair a wrong artifact after receiving concrete feedback. This paper presents A-CEGIS, a lightweight framework that uses counterexamples as feedback for evaluating multi-turn refinement in natural-language-to-regex synthesis. An agent proposes a regex, a deterministic oracle checks it under full-match semantics, and compact false-positive or false-negative witnesses guide the next turn. On 30 NL-RX-Turk tasks, diagnostic counterexample feedback solves 90\% of tasks within a four-turn ablation budget, compared with 17% for zero-shot generation, 27% for generic self-correction, and 23% for error-only feedback. In a full diagnostic run with hardening, all tasks are solved on the hidden set by the final turn, with mean time-to-success of 2.7 turns and robust success of 77% after targeted probing. These results show that A-CEGIS measures how efficiently an agent improves across turns while adding a practical robustness check beyond the original held-out cases.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI
Related papers
LUCID: Statistically Grounded Self-Correction for LLM Reasoning Evaluation
Shared title terminologycs.CLSatiyabooshan Murugaboopathy, Adel Daoud, Connor T. Jerzak
IRTIQA: Evolving in English, Evaluated in Urdu -- Does Agent Self-Evolution Transfer from English to Urdu and Code-Switched Input?
Shared title terminologycs.CLAbdullah Hashmat, Danish Javed, Usman Naseem et al.
Sports Agent: A Self-Evolving System for Conversational Data Analytics
Shared title terminologycs.CLChao Chen, Fuqi Lin, Ze Chen et al.
μ-Bench: Benchmarking Multi-User Task Completion in Shared Interaction Voice Agents
Shared title terminologycs.CLQihao Lin, Guanxu Chen, Shuhang Zheng et al.
DRBench Pro: A Knowledge-Centric Benchmark for Professional Deep Research Agents
Shared title terminologycs.CLHan Huang, Yuchen Yan, Xingyu Wu et al.
Collect for Coverage, Replay with Evidence: Adaptive and Efficient On-Policy Distillation for Long-Horizon Agents
Shared title terminologycs.CLHaowen Hou, Gen Li, Ruilin Li et al.