[논문 리뷰] Alibaba LingmaAgent: Improving Automated Issue Resolution via Comprehensive Repository Exploration
RepoUnderstander는 저장소 지식 그래프와 몬테카를로 트리 탐색을 사용하여 LLM 기반 에이전트가 전체 소프트웨어 저장소를 이해하도록 해 자동 이슈 해결을 개선하고, 기존 RAG 및 에이전트 베이스라인 대비 향상시킵니다.
This paper presents Alibaba LingmaAgent, a novel Automated Software Engineering method designed to comprehensively understand and utilize whole software repositories for issue resolution. Deployed in TONGYI Lingma, an IDE-based coding assistant developed by Alibaba Cloud, LingmaAgent addresses the limitations of existing LLM-based agents that primarily focus on local code information. Our approach introduces a top-down method to condense critical repository information into a knowledge graph, reducing complexity, and employs a Monte Carlo tree search based strategy enabling agents to explore and understand entire repositories. We guide agents to summarize, analyze, and plan using repository-level knowledge, allowing them to dynamically acquire information and generate patches for real-world GitHub issues. In extensive experiments, LingmaAgent demonstrated significant improvements, achieving an 18.5\% relative improvement on the SWE-bench Lite benchmark compared to SWE-agent. In production deployment and evaluation at Alibaba Cloud, LingmaAgent automatically resolved 16.9\% of in-house issues faced by development engineers, and solved 43.3\% of problems after manual intervention. Additionally, we have open-sourced a Python prototype of LingmaAgent for reference by other industrial developers https://github.com/RepoUnderstander/RepoUnderstander. In fact, LingmaAgent has been used as a developed reference by many subsequently agents.
연구 동기 및 목표
- 전체 저장소를 이해하는 것이 자동 소프트웨어 엔지니어링 작업에 결정적임을 주장한다.
- 저장소 정보를 구조화된 지식 그래프에 축약해 입력 복잡성을 줄인다.
- 저장소 그래프를 효율적으로 탐색하기 위한 MCTS 기반 탐색 전략을 개발한다.
- 저장소 수준의 지식을 활용하기 위해 요약 및 계획을 활용한다.
제안 방법
- 파일, 클래스, 함수의 위에서 아래로 계층적 구조화와 함수 호출 참조 그래프를 포함한 저장소 지식 그래프를 구성한다.
- 이슈와 가장 관련된 저장소 영역을 식별하기 위해 상관관계 및 참조 확장 탐색이 포함된 몬테카를로 트리 탐색을 적용한다.
- 이슈와의 관련성을 평가하기 위해 인-context 학습과 사고의 연쇄에서 영감을 받은 보상 기반 평가를 사용해 잎 노드를 평가한다.
- 해결 과정에서 저장소 경험을 요약하고 API 도구를 통해 로컬 정보를 동적으로 검색해 코드 스니펫을 수집한다.
- 저장소 질의 및 패치 생성을 위한 추론 경로와 행동을 생성하기 위해 ReAct에서 영감을 얻은 프레임워크를 활용한다.
- 버그를 찾아 관련 코드 맥락을 추출하고 구문 정확성을 위한 최대 세 번의 재시도를 통해 차이(diff)를 생성한다.
실험 결과
연구 질문
- RQ1저장소 수준의 지식 그래가 로컬 중심 접근 방식에 비해 자동 이슈 해결의 효율성 및 효과를 개선할 수 있는가?
- RQ2MCTS 기반 탐색 전략이 에이전트의 패치 생성에 필요한 관련 저장소 정보를 찾고 활용하는 능력을 향상시키는가?
- RQ3요약 및 저장소에서의 동적 정보 검색이 결함 위치 파악 및 패치 품질에 어떤 영향을 미치는가?
- RQ4저장소 수준의 지식을 통합하는 것이 패치 적용성 및 성공률에 어떤 영향을 미치는가?
주요 결과
- RepoUnderstander는 SWE-bench Lite(64 이슈)에서 해결률 21.33%, 패치 적용률 85.67%를 달성했다.
- RAG 기반 베이스라인과 비교해 RepoUnderstander는 성능을 거의 5배 향상시킨다.
- 에이전트 기반 베이스라인에 대해 RepoUnderstander는 해결 지표에서 SWE-에이전트 성능을 18.5포인트 향상시켰다.
- AutoCodeRover 및 SWE-에이전트는 패치 적용성에서 여전히 강하며 피드백 실행의 가치를 보여준다; RepoUnderstander는 이 접근법들을 보완한다.
- 연구는 SWE-bench의 정보 비대칭성을 식별하고 더 신뢰할 수 있는 평가를 가능케 하는 FIX 버전을 제안합니다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.