Research Article

Improving OpenDevin: Boosting code generation LLM through advanced memory management

Runyu He*, Anyu Ying, Xiaoyu Hu
Carnegie Mellon University, 5000 Forbes Ave, Pittsburgh, PA 15213

* Corresponding author: [email protected]

Abstract

OpenDevin, a code generation AI tool, has emerged as a powerful assistant for both technical and non-technical users, offering a practical approach to coding challenges. Unlike traditional code generators that merely output code, OpenDevin excels by executing code directly in a console, allowing for immediate testing and verification. This functionality not only streamlines the coding process but also enhances learning and troubleshooting, making it accessible to a broader audience. In this project, we address several key challenges to improve OpenDevin’s effectiveness, especially in handling multi-round conversations and contextually relevant code generation. Our team identified and tackled two main challenges faced by OpenDevin: variety of input, and multi-step conversations. Through incorporating a series of functions to parse, summarize, and organize LLM agent’s memory logs, we significantly improved OpenDevin agent’s capabilities among a variety of tasks. The integration of efficient memory management led to a notable increase in accuracy—from 44.4% to 88.9% —in multi-round conversations, highlighting the importance of effective memory management in AI-powered coding tools. This report details our methodology, the challenges we faced, and the solutions we implemented, showcasing OpenDevin’s potential to revolutionize the way users from various backgrounds engage with coding tasks.

Keywords: Code Generation; Large Language Models; Memory Management; AI Copilot; Multi-Round Conversations
Published: July 23, 2024
DOI: 10.54254/2755-2721/68/20241506
Volume: ACE Vol.68
pp. 311-318
Download PDF

References

  1. Daya Guo, Qihao Zhu, Dejian Yang, Zhenda Xie, Kai Dong, Wentao Zhang, Guanting Chen, Xiao Bi, Y. Wu, Y. K. Li, Fuli Luo, Yingfei Xiong, and Wenfeng Liang. Deepseek-coder: When the large language model meets programming–the rise of code intelligence, 2024.
  2. Anton Lozhkov, Raymond Li, Loubna Ben Allal, Federico Cassano, Joel Lamy-Poirier, et al. Starcoder 2 and the stack v2: The next generation, 2024.
  3. GitHub. Github copilot: Your ai pair programmer. https://copilot.github.com, 2021.
  4. Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik Narasimhan. Swe-bench: Can language models resolve real-world github issues?, 2024.
  5. Cognition Labs. Devin: The first ai software engineer.https://www.cognition-labs.com/introducing-devin, 2024.
  6. OpenDevin. Opendevin: Code less, make more. https://github.com/OpenDevin/OpenDevin, 2024. Retrieved from GitHub.
  7. Leetcode—the world’s leading online programming learning platform, 2024. Retrieved May 1, 2024.
  8. Ofir Press, Muru Zhang, Sewon Min, Ludwig Schmidt, Noah A. Smith, and Mike Lewis. Measuring and narrowing the compositionality gap in language models, 2023.
  9. Mosh Levy, Alon Jacoby, and Yoav Goldberg. Same task, more tokens: the impact of input length on the reasoning performance of large language models, 2024.
  10. Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. Lost in the middle: How language models use long contexts, 2023.
  11. Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. Lost in the middle: How language models use long contexts, 2023.