ExplainBench: 에이전트의 코드 설명 평가
ExplainBench: Evaluating Code Explanations from Agents
July 29, 2026
저자: Zhiyuan Pan, Sungmin Kang, Imam Nur Bani Yusuf, Abhik Roychoudhury
cs.AI
초록
대규모 언어 모델(LLM) 에이전트는 소프트웨어 엔지니어링 분야에서 빠르게 채택되고 있다. 에이전트가 실제 코드 생성에서 더 큰 역할을 담당함에 따라 수십에서 수백 줄에 이르는 더 큰 변경을 수행하고 있다. 이로 인해 에이전트 결과에 대한 수동 검토가 점점 더 비현실적이 되어, 개발자들은 실행된 변경 사항을 이해하기 위해 설명에 의존하게 되었다. 그럼에도 불구하고 에이전트가 생성한 설명의 신뢰성을 평가하는 벤치마크는 존재하지 않는다. 이러한 격차를 해소하기 위해, 우리는 코딩 에이전트의 설명을 자동으로 평가하는 벤치마크인 ExplainBench를 제안한다. ExplainBench는 정보를 제공하는 설명은 LLM이 질문에 정확히 답할 수 있게 해주며, 이를 통해 에이전트 간 설명 품질의 정량적 비교가 가능하다는 직관에 기반한다. 이러한 관찰을 바탕으로, 우리는 설명이 (1) 버그가 있는 코드의 의도된 동작과 (2) 에이전트 패치 적용 자체의 효과를 정확히 기술하는지 평가하는 일련의 질문을 구성한다. 실험을 통해 먼저 설명 품질이 에이전트 평가의 별개의 축임이 드러난다: ExplainBench는 널리 사용되는 SWE-bench Verified 벤치마크와 다르게 에이전트의 순위를 매긴다. 에이전트의 설명 품질에 대한 더 깊은 분석은 설명의 빈번한 문제점을 보여주는데, 패치가 올바르지 않음에도 올바르다고 주장하는 경우가 자주 발생한다. 이러한 통찰을 바탕으로, 우리는 설명을 검증하고 개선하기 위해 추가 테스트를 실행하는 설명 감사 에이전트를 구현하고 평가한다. 이 에이전트는 평가된 모든 에이전트의 설명을 개선했으며, 이는 에이전트 설명이 자동으로 더 신뢰할 수 있게 만들어질 수 있음을 보여준다.
English
Large Language Model (LLM) agents have seen rapid adoption in software engineering. As agents take a greater role in the actual generation of code, they are making larger changes, spanning tens to hundreds of lines. This makes manual review of agent results increasingly infeasible, leading developers to turn to explanations to understand enacted changes. Despite this, there are no benchmarks that evaluate the trustworthiness of agent-generated explanations. To bridge this gap, we propose ExplainBench, a benchmark to automatically evaluate explanations from coding agents. ExplainBench is based on the intuition that informative explanations should enable an LLM to correctly answer questions, allowing quantitative comparison of explanation quality between agents. With this observation, we construct a suite of questions that evaluates whether explanations accurately describe (1) the intended behavior of buggy code and (2) the effect of applying the agent patch itself. Experiments first reveal that explanation quality is a distinct axis of agent evaluation: ExplainBench ranks agents differently from the widely-used SWE-bench Verified benchmark. A deeper breakdown of explanation quality in agents shows frequent problems in explanations, such that explanations often claim that a patch is correct when it is not. Based on this insight, we implement and evaluate an explanation audit agent which runs additional tests to validate and refine explanations. This agent improved the explanations of all evaluated agents, demonstrating agent explanations can be automatically made more trustworthy.