탐색자: LLM 기반 다중 에이전트를 활용한 코드 예외 처리 향상
Seeker: Enhancing Exception Handling in Code with LLM-based Multi-Agent Approach
October 9, 2024
저자: Xuanming Zhang, Yuxuan Chen, Yuan Yuan, Minlie Huang
cs.AI
초록
실제 소프트웨어 개발에서, 부적절하거나 누락된 예외 처리는 코드의 견고성과 신뢰성에 심각한 영향을 미칠 수 있습니다. 예외 처리 메커니즘은 개발자가 높은 기준에 따라 예외를 감지, 포착 및 관리해야 하지만, 많은 개발자들이 이러한 작업에 어려움을 겪어 취약한 코드를 만들어내곤 합니다. 이 문제는 오픈 소스 프로젝트에서 특히 두드러지며 소프트웨어 생태계 전반에 영향을 미칩니다. 이러한 도전에 대처하기 위해, 우리는 코드에서 예외 처리를 개선하기 위해 대형 언어 모델(LLMs)의 활용을 탐구합니다. 철저한 분석을 통해 우리는 세 가지 주요 문제를 식별했습니다: 취약한 코드의 민감하지 않은 감지, 예외 유형의 부정확한 포착, 그리고 왜곡된 처리 솔루션. 이러한 문제들은 실제 저장소 전반에 널리 퍼져 있어 견고한 예외 처리 관행이 종종 간과되거나 잘못 다뤄지고 있음을 시사합니다. 이에 대응하여, 우리는 예외 처리를 개선하기 위해 전문 개발자 전략에서 영감을 받은 다중 에이전트 프레임워크인 Seeker를 제안합니다. Seeker는 스캐너, 디텍터, 프레데터, 랭커, 핸들러라는 에이전트를 활용하여 LLMs가 예외를 더 효과적으로 감지, 포착 및 해결할 수 있도록 지원합니다. 우리의 연구는 예외 처리 관행을 향상시키기 위해 LLMs를 활용하는 첫 번째 체계적인 연구로, 코드 신뢰성의 미래적 개선을 위한 소중한 통찰을 제공합니다.
English
In real world software development, improper or missing exception handling
can severely impact the robustness and reliability of code. Exception handling
mechanisms require developers to detect, capture, and manage exceptions
according to high standards, but many developers struggle with these tasks,
leading to fragile code. This problem is particularly evident in open source
projects and impacts the overall quality of the software ecosystem. To address
this challenge, we explore the use of large language models (LLMs) to improve
exception handling in code. Through extensive analysis, we identify three key
issues: Insensitive Detection of Fragile Code, Inaccurate Capture of Exception
Types, and Distorted Handling Solutions. These problems are widespread across
real world repositories, suggesting that robust exception handling practices
are often overlooked or mishandled. In response, we propose Seeker, a multi
agent framework inspired by expert developer strategies for exception handling.
Seeker uses agents: Scanner, Detector, Predator, Ranker, and Handler to assist
LLMs in detecting, capturing, and resolving exceptions more effectively. Our
work is the first systematic study on leveraging LLMs to enhance exception
handling practices, providing valuable insights for future improvements in code
reliability.Summary
AI-Generated Summary