跳到主要导航 跳到搜索 跳到主要内容

CODEXGRAPH: Bridging Large Language Models and Code Repositories via Code Graph Databases

  • Xiangyan Liu
  • , Bo Lan
  • , Zhiyuan Hu
  • , Yang Liu
  • , Zhicheng Zhang
  • , Fei Wang
  • , Michael Shieh
  • , Wenmeng Zhou
  • National University of Singapore
  • Alibaba Group Holding Ltd.
  • Xi'an Jiaotong University

科研成果: 书/报告/会议事项章节会议稿件同行评审

11 引用 (Scopus)

摘要

Large Language Models (LLMs) excel in stand-alone code tasks like HumanEval and MBPP, but struggle with handling entire code repositories. This challenge has prompted research on enhancing LLM-codebase interaction at a repository scale. Current solutions rely on similarity-based retrieval or manual tools and APIs, each with notable drawbacks. Similarity-based retrieval often has low recall in complex tasks, while manual tools and APIs are typically task-specific and require expert knowledge, reducing their generalizability across diverse code tasks and real-world applications. To mitigate these limitations, we introduce CODEXGRAPH, a system that integrates LLM agents with graph database interfaces extracted from code repositories. By leveraging the structural properties of graph databases and the flexibility of the graph query language, CODEXGRAPH enables the LLM agent to construct and execute queries, allowing for precise, code structure-aware context retrieval and code navigation. We assess CODEXGRAPH using three benchmarks: CrossCodeEval, SWE-bench, and EvoCodeBench. Additionally, we develop five real-world coding applications. With a unified graph database schema, CODEXGRAPH demonstrates competitive performance and potential in both academic and real-world environments, showcasing its versatility and efficacy in software engineering. Our code and demo will be released soon.

源语言英语
主期刊名Long Papers
编辑Luis Chiruzzo, Alan Ritter, Lu Wang
出版商Association for Computational Linguistics (ACL)
142-160
页数19
ISBN(电子版)9798891761896
DOI
出版状态已出版 - 2025
活动2025 Annual Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2025 - Hybrid, Albuquerque, 美国
期限: 29 4月 20254 5月 2025

丛书

姓名Proceedings of the 2025 Annual Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies: Long Papers, NAACL-HLT 2025
1

会议

会议2025 Annual Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2025
国家/地区美国
Hybrid, Albuquerque
时期29/04/254/05/25

学术指纹

探究 'CODEXGRAPH: Bridging Large Language Models and Code Repositories via Code Graph Databases' 的科研主题。它们共同构成独一无二的学术指纹。

引用此