Counterexamples as Feedback for Agent Self-Correction
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 8 of its 17 references that are in the map. First posted on arXiv 1 Jul 2026.
Builds on
8 of 17 references.
References · 8
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2024AgentBoard: An Analytical Evaluation Board of Multi-turn LLM Agentscited by 339
- 2025Evaluating LLM-based Agents for Multi-Turn Conversations: A Surveycited by 57
- 2016Neural Generation of Regular Expressions from Natural Language with Minimal Domain Knowledgecited by 24
- 2025Benchmarking Correctness and Security in Multi-Turn Code Generationcited by 4
Built on by
Not cited yet.