Skip to main content
QUICK REVIEW

[Paper Review] Alibaba LingmaAgent: Improving Automated Issue Resolution via Comprehensive Repository Exploration

Yingwei Ma, Qingping Yang|arXiv (Cornell University)|Jun 3, 2024
Software Engineering ResearchComputer Science6 citations
TL;DR

RepoUnderstander uses a repository knowledge graph and Monte Carlo Tree Search to enable LLM-based agents to understand whole software repositories, improving automatic issue resolution compared to prior RAG and agent baselines.

ABSTRACT

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.

Motivation & Objective

  • Argue that understanding the entire repository is crucial for automated software engineering tasks.
  • Condense repository information into a structured knowledge graph to reduce input complexity.
  • Develop an MCTS-based exploration strategy to navigate repository graphs efficiently.
  • Leverage summarization and planning to utilize repository-level knowledge for fault localization and patch generation.

Proposed method

  • Construct a repository knowledge graph by top-down hierarchical structuring of files, classes, and functions plus a function-call reference graph.
  • Apply Monte Carlo Tree Search with correlation and reference-expanded exploration to identify repository regions most relevant to the issue.
  • Use a reward-based evaluation inspired by in-context learning and chain-of-thought to score leaf nodes for relevance to the issue.
  • Summarize repository experience and dynamically retrieve local information via API tools to gather code snippets during solving.
  • Employ a ReAct-inspired framework to generate reasoning paths and actions for repository querying and patch generation.
  • Generate patches by locating faults, extracting relevant code context, and producing diffs with up to three retries for syntax correctness.

Experimental results

Research questions

  • RQ1Can a repository-level knowledge graph improve the efficiency and effectiveness of automatic issue resolution compared to local-focus approaches?
  • RQ2Does an MCTS-based exploration strategy enhance the agents’ ability to find and utilize relevant repository information for patch generation?
  • RQ3How does summarization and dynamic information retrieval from the repository affect fault localization and patch quality?
  • RQ4What is the impact of incorporating repository-level knowledge on patch applicability and success rates?

Key findings

  • RepoUnderstander achieves 21.33% resolved rate on SWE-bench Lite (64 issues) with an 85.67% patch application rate.
  • Compared to RAG-based baselines, RepoUnderstander improves performance by nearly 5x.
  • Against agent-based baselines, RepoUnderstander improves SWE-agent performance by 18.5 percentage points in the resolved metric.
  • AutoCodeRover and SWE-agent remain strong in patch applicability, showing the value of running feedback; RepoUnderstander complements these approaches.
  • The study identifies information asymmetry in SWE-bench and proposes an FIX version to enable more reliable evaluation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.