← 开源
gersteinlab

LocAgent

[ACL 2025] Graph-guided agentic framework for code localization https://arxiv.org/abs/2503.09089

ApplicationsCodingPython
在 GitHub 打开
增长势头
+124 小时新增 Star+0.2%
633
Star
97
Fork
+1
本周
3
贡献者
创建于 2025-03-12 · 更新于 2026-10-15 · 今日第 6555 名
主要开发者
czlllHydrapsetangxiangru

gersteinlab/LocAgent 排名第 6,555,有 633 个星标。

同类别比较

gersteinlab/LocAgent 排名第 6,555,此处有 8 个同类条目;liruifengv/we-drawing 排名第 6,553。

同类别比较
名称排名指标
DeadWaveWave/demo2apk6,536
语言:
TypeScript
星标数:
642
分叉数:
69
简介:
Turn your Vibe Coding ideas into runnable Android Apps instantly
kieranjwood/trading-momentum-transformer6,539
语言:
Python
星标数:
641
分叉数:
255
简介:
This code accompanies the the paper Trading with the Momentum Transformer: An Intelligent and Interpretable Architecture (https://arxiv.org/pdf/2112.08534.pdf).
SeanHeelan/anamnesis-release6,547
语言:
JavaScript
星标数:
635
分叉数:
87
简介:
Automatic Exploit Generation with LLMs
liruifengv/we-drawing6,553
语言:
TypeScript
星标数:
634
分叉数:
79
简介:
AI画图。每天一句中国古诗词,生成 AI 图片。
minghe36/haoone-app6,565
语言:
JavaScript
星标数:
628
分叉数:
5
简介:
新一代 AI 专业字幕软件,剪映字幕、elevenlabs 语音转文本的最佳本地版平替之一,也是加强版。中英转录识别准确率超过 97%,词语音频对齐率 98%,说话人分割与识别准确率 96%,带有最先进的 ASR 开源模型,100+字幕动画(支持导出透明背景的字幕动画)。说话人识别、专业字幕编辑器、命令行工具、Skill,达芬奇字幕插件(含字幕动画插件),PR 字幕插件,本地转录、远程转录、文稿匹配、智能拆行、AI校正、AI 智能热词、翻译、双语字幕、专业字幕编辑器、字幕合成、自定义大模型 API
johnsonhk88/AI-Bank-Statement-Document-Automation-By-LLM-And-Personal-Finanical-Analysis-Prediction6,568
语言:
Jupyter Notebook
星标数:
627
分叉数:
122
简介:
AI Bank Statement Document Automation By LLM model and Personal Finanical Analysis
raojiacui/prompt-lens6,569
语言:
TypeScript
星标数:
627
分叉数:
79
简介:
反推出AI视频的提示词,并配有音频分析功能,可提取视频中的台词文案,并且一句话就可剪辑出你要的视频
PKU-YuanGroup/OpenAI4S6,571
语言:
Python
星标数:
626
分叉数:
72
简介:
Open-source AI agent for scientific research. Analyze data in Python/R with Claude, GPT, Gemini, and more.
关键参数与规格
关键参数与规格
参数值
语言Python
类别Applications
子类别Coding
星标数633
分叉数97
贡献者3
创建日期2025-03-12
更新日期2026-10-15
1 天星标数1
7 天星标数1
排名6,555
上次排名15,593
排名变化9,038
7 天星标排名11,096
上次 7 天星标排名15,186
7 天星标排名变化4,090
总星标排名16,105
上次总星标排名16,107
总星标排名变化2
国家USA
README 摘录

LocAgent: Graph-Guided LLM Agents for Code Localization 📑 Paper | 📊 Loc-bench | 🤗 Qwen2. NOTE] CodeNib serves LocAgent's search and graph-navigation tools from reusable, manifest-backed symbol-graph and BM25 indexes, without building a separate LocAgent index. The CodeNib integration starts from a prepared and runs LocAgent's localization policy over these indexes; model training and the original reproduction pipeline remain in this repository. Documentation · Adapter · Provider ℹ️ Overview We introduce **LocAgent**, a framework that addresses code localization through graph-based representation. By

parsing codebases into directed heterogeneous graphs, LocAgent creates a lightweight representation that captures code structures and their dependencies, enabling LLM agents to effectively search and locate relevant entities through powerful multi-hop reasoning. Follow these steps to set up your development environment: 🚀 Launch LocAgent 1. (Optional but recommended) Parse the codebase for each issue in the benchmark to generate graph indexes in batch. : select the benchmark (by default it will be ); you can choose from (adapted for code localization) and

SWE-bench series datasets like : the directory where you plan to pull or have already pulled the codebase : the base directory where the generated graph index will be saved : whether to download the codebase to before indexing 2. Export the directory of the graph indexes and the BM25 sparse index. If not generated in advance, the graph index will be generated during the localization process. : set to start the localization process : merge the result of multiple samples : enable function calling

features of LLMs. If disabled, codeact will be used to support function calling : use simplified function descriptions due to certain LLM limitations. Set to False for better performance when using Claude. Evaluation After localization, the results will be saved in a JSONL file.

常见问题

记录了多少星标和分叉?

gersteinlab/LocAgent 有 633 个星标和 97 个分叉。

仓库排名是多少?

gersteinlab/LocAgent 排名第 6,555。

记录的语言和类别是什么?

gersteinlab/LocAgent 有 633 个星标,语言为 Python,类别为 Applications。

哪个仓库排名最接近?

gersteinlab/LocAgent 与 liruifengv/we-drawing 比较,后者排名第 6,553,有 634 个星标。

README

LocAgent: Graph-Guided LLM Agents for Code Localization

📑  Paper | 📊  Loc-bench | 🤗  Qwen2.5-Coder-7B-CL | 🤗  Qwen2.5-Coder-32B-CL

[!NOTE] CodeNib serves LocAgent's search and graph-navigation tools from reusable, manifest-backed symbol-graph and BM25 indexes, without building a separate LocAgent index. The CodeNib integration starts from a prepared repo_manifest.json and runs LocAgent's localization policy over these indexes; model training and the original reproduction pipeline remain in this repository.

Documentation · Adapter · Provider

ℹ️ Overview

We introduce LocAgent, a framework that addresses code localization through graph-based representation. By parsing codebases into directed heterogeneous graphs, LocAgent creates a lightweight representation that captures code structures and their dependencies, enabling LLM agents to effectively search and locate relevant entities through powerful multi-hop reasoning.

⚙️ Setup

  1. Follow these steps to set up your development environment:
    git clone git@github.com:gersteinlab/LocAgent.git
    cd LocAgent
    
    conda create -n locagent python=3.12
    conda activate locagent
    pip install -r requirements.txt
    

🚀 Launch LocAgent

  1. (Optional but recommended) Parse the codebase for each issue in the benchmark to generate graph indexes in batch.

    python dependency_graph/batch_build_graph.py \
          --dataset 'czlll/Loc-Bench_V1' \
          --split 'test' \
          --num_processes 50 \
          --download_repo
    
    • dataset: select the benchmark (by default it will be SWE-Bench_Lite); you can choose from ['czlll/SWE-bench_Lite', 'czlll/Loc-Bench_V1'](adapted for code localization) and SWE-bench series datasets like ['princeton-nlp/SWE-bench_Lite', 'princeton-nlp/SWE-bench_Verified', 'princeton-nlp/SWE-bench']
    • repo_path: the directory where you plan to pull or have already pulled the codebase
    • index_dir: the base directory where the generated graph index will be saved
    • download_repo: whether to download the codebase to repo_path before indexing
  2. Export the directory of the graph indexes and the BM25 sparse index. If not generated in advance, the graph index will be generated during the localization process.

    export GRAPH_INDEX_DIR='{INDEX_DIR}/{DATASET_NAME}/graph_index_v2.3'
    export BM25_INDEX_DIR='{INDEX_DIR}/{DATASET_NAME}/BM25_index'
    
  3. Run the script scripts/run_lite.sh to lauch LocAgent.

    python auto_search_main.py \
       --dataset 'czlll/SWE-bench_Lite' \
       --split 'test' \
       --model 'azure/gpt-4o' \
       --localize \
       --merge \
       --output_folder $result_path/location \
       --eval_n_limit 300 \
       --num_processes 50 \
       --use_function_calling \
       --simple_desc
    
    • localize: set to start the localization process
    • merge: merge the result of multiple samples
    • use_function_calling: enable function calling features of LLMs. If disabled, codeact will be used to support function calling
    • simple_desc: use simplified function descriptions due to certain LLM limitations. Set to False for better performance when using Claude.
  4. Evaluation After localization, the results will be saved in a JSONL file. You can evaluate them using evaluation.eval_metric.evaluate_results. Refer to evaluation/run_evaluation.ipynb for a demonstration.

📑 Cite Us

@inproceedings{chen-etal-2025-locagent,
 title = "{L}oc{A}gent: Graph-Guided {LLM} Agents for Code Localization",
 author = "Chen, Zhaoling  and
   Tang, Robert  and
   Deng, Gangda  and
   Wu, Fang  and
   Wu, Jialong  and
   Jiang, Zhiwei  and
   Prasanna, Viktor  and
   Cohan, Arman  and
   Wang, Xingyao",
 editor = "Che, Wanxiang  and
   Nabende, Joyce  and
   Shutova, Ekaterina  and
   Pilehvar, Mohammad Taher",
 booktitle = "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
 month = jul,
 year = "2025",
 address = "Vienna, Austria",
 publisher = "Association for Computational Linguistics",
 url = "https://aclanthology.org/2025.acl-long.426/",
 doi = "10.18653/v1/2025.acl-long.426",
 pages = "8697--8727",
 ISBN = "979-8-89176-251-0",
 abstract = "Code localization{--}identifying precisely where in a codebase changes need to be made{--}is a fundamental yet challenging task in software maintenance. Existing approaches struggle to efficiently navigate complex codebases when identifying relevant code snippets.The challenge lies in bridging natural language problem descriptions with the target code elements, often requiring reasoning across hierarchical structures and multiple dependencies.We introduce LocAgent, a framework that addresses code localization through a graph-guided agent.By parsing codebases into directed heterogeneous graphs, LocAgent creates a lightweight representation that captures code structures and their dependencies, enabling LLM agents to effectively search and locate relevant entities through powerful multi-hop reasoning.Experimental results on real-world benchmarks demonstrate that our approach significantly enhances accuracy in code localization.Notably, our method with the fine-tuned Qwen-2.5-Coder-Instruct-32B model achieves comparable results to SOTA proprietary models at greatly reduced cost (approximately 86{\%} reduction), reaching up to 92.7{\%} accuracy on file-level localization while improving downstream GitHub issue resolution success rates by 12{\%} for multiple attempts (Pass@10). Our code is available at \url{https://github.com/gersteinlab/LocAgent}."
}
排名相邻
同类项目