SpecFirst: 에이전트 기반 프로그램 합성에서 행동 명세 추출을 핵심 단계로 활용
SpecFirst: Behavioral Specification Elicitation as a First-Class Step in Agent-Based Program Synthesis from Scratch
LLM(대규모 언어 모델) 기반 에이전트는 기존 코드베이스의 맥락을 활용하는 소프트웨어 엔지니어링 작업에 뛰어난 성능을 보이지만, 처음부터 프로그램을 구축하는 것은 여전히 근본적으로 어렵습니다. 최근 ProgramBench와 같은 벤치마크는 이러한 격차를 보여줍니다. 자연어 문서와 실행 파일만을 제공받아 행동적인 지침으로 사용하는 경우에도 최첨단 모델조차 문제의 1% 미만에 대한 해결책을 제시합니다. 기존 프레임워크는 문서 분석, 행동 탐색 및 코드 생성을 하나의 단계로 통합하므로 에이전트가 충분히 탐색하지 못하고, 맥락 변화에 따라 의도하는 바를 잃으며, 초기 오해를 최종 구현으로 전달하게 됩니다. 고전적인 요구사항 공학에서 영감을 받아 우리는 행동 명세 추출이 구현 전에 수행되어야 하는 핵심 단계라고 주장합니다. 본 논문에서는 SpecFirst라는 두 단계 프레임워크를 제시하며, 이 프레임워크는 코드 생성이 시작되기 전에 명세 추출을 우선시합니다. 전용 명세 에이전트가 먼저 실행 파일을 탐색하고 관찰 결과를 문서와 결합하여 구조화된 명세를 생성합니다. 그런 다음, 코드 합성 에이전트는 이 명세를 사용하여 구현을 진행합니다. 이러한 분해는 코딩 시작 전에 문서의 모호성을 해결하고, 전체 합성 과정에서 안정적인 행동적 참조점을 제공합니다. 우리는 SpecFirst를 다양한 성능 수준의 4가지 모델에 대한 ProgramBench의 모든 200개 문제에 대해 평가했습니다. SpecFirst는 일관되게 기존 방식보다 뛰어난 성능을 보였으며, 테스트 성공률은 6.9%에서 21.3%, 실행 파일 탐색 범위는 9.4%에서 18.5% 향상되었으며, 모든 결과가 통계적으로 유의미합니다. 코드 합성 과정에 대한 행동 분석 결과, 사전 정의된 명세는 더 빠르고 지속적인 코드 구축을 가능하게 합니다. 우리의 연구 결과는 명시적인 요구사항 공학 단계가 처음부터 프로그램을 구축하는 데 효과적인 패러다임임을 보여줍니다.
LLM-based agents excel at software engineering tasks where an existing codebase provides context, but constructing a program from scratch remains fundamentally harder. Recent benchmarks such as ProgramBench quantify this gap: given only natural-language documentation and an execute-only binary as a behavioral oracle, even frontier models solve fewer than 1% of instances. Existing frameworks conflate documentation reading, behavioral exploration, and code synthesis into a single pass, causing agents to probe insufficiently, lose behavioral intent as context drifts, and propagate early misinterpretations into the final implementation. Inspired by classical requirements engineering, we argue that behavioral specification elicitation should be a first-class phase that precedes implementation. We present SpecFirst, a two-stage framework that forces the specification elicitation before code synthesis. A dedicated spec agent first probes the binary and combines observations with documentation into a structured specification. Next, a code synthesis agent then uses this specification to drive implementation. This decomposition resolves documentation ambiguities before coding begins and provides a stable behavioral reference throughout synthesis. We evaluate SpecFirst on all 200 ProgramBench instances across four models spanning two families and an order of magnitude of capability. SpecFirst consistently outperforms the single-loop baseline, improving test pass rates by 6.9%-21.3% and binary exploration coverage by 9.4%-18.5%, all statistically significant. Behavioral analysis on code synthesis further shows that a prior specification enables earlier and more sustained code construction. Our results demonstrate that an explicit requirements-engineering phase is an effective paradigm for from-scratch program construction.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.