CODESTRUCT: 구조화된 동작 공간 기반 코드 에이전트
CODESTRUCT: Code Agents over Structured Action Spaces
LLM 기반 코드 에이전트는 저장소를 비정형 텍스트로 취급하며, 형식 변경 또는 모호한 패턴으로 인해 종종 실패하는 취약한 문자열 매칭을 통해 수정 작업을 수행합니다. 우리는 코드베이스를 에이전트가 텍스트 스팬이 아닌 명명된 AST 엔티티에 대해 작동하는 구조화된 동작 공간으로 재구성하는 것을 제안합니다. 저희의 프레임워크인 CODESTRUCT는 전체 구문 단위를 검색하는 readCode 기능과 의미 있는 프로그램 요소에 대해 구문 검증된 변환을 적용하는 editCode 기능을 제공합니다. SWE-Bench Verified 데이터셋에서 6개의 LLM을 사용하여 평가한 결과, CODESTRUCT는 Pass@1 정확도를 1.2~5.0% 향상시키고, 대부분의 모델에서 토큰 사용량을 12~38% 줄였습니다. 텍스트 기반 인터페이스에서 유효한 패치를 생성하는 데 자주 실패하는 모델에서 가장 큰 효과를 보였습니다. 예를 들어, GPT-5-nano는 20.8%의 정확도 향상을 보였으며, 빈 패치 실패율이 46.6%에서 7.2%로 감소했습니다. CodeAssistBench 데이터셋에서는 일관된 정확도 향상(+0.8~4.4%)과 최대 33%의 비용 절감을 관찰했습니다. 이러한 결과는 구조 인식 인터페이스가 코드 에이전트를 위한 더욱 안정적인 기반을 제공한다는 것을 보여줍니다.
LLM-based code agents treat repositories as unstructured text, applying edits through brittle string matching that frequently fails due to formatting drift or ambiguous patterns. We propose reframing the codebase as a structured action space where agents operate on named AST entities rather than text spans. Our framework, CODESTRUCT, provides readCode for retrieving complete syntactic units and editCode for applying syntax-validated transformations to semantic program elements. Evaluated on SWE-Bench Verified across six LLMs, CODESTRUCT improves Pass@1 accuracy by 1.2-5.0% while reducing token consumption by 12-38% for most models. Models that frequently fail to produce valid patches under text-based interfaces benefit most: GPT-5-nano improves by 20.8% as empty-patch failures drop from 46.6% to 7.2%. On CodeAssistBench, we observe consistent accuracy gains (+0.8-4.4%) with cost reductions up to 33%. Our results show that structure-aware interfaces offer a more reliable foundation for code agents.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.