Large Language Model (LLM) coding agents typically explore codebases through repeated file-reading and grep-searching, consuming thousands of tokens per query without structural understanding. We present Codebase-Memory, an open-source system that constructs a persistent, Tree-Sitter-based knowledge graph via the Model Context Protocol (MCP), parsing 66 languages through a multi-phase pipeline with parallel worker pools, call-graph traversal, impact analysis, and community discovery. Evaluated across 31 real-world repositories, Codebase-Memory achieves 83% answer quality versus 92% for a file-exploration agent, at ten times fewer tokens and 2.1 times fewer tool calls. For graph-native queries such as hub detection and caller ranking, it matches or exceeds the explorer on 19 of 31 languages.


翻译:大型语言模型(LLM)编码代理通常通过反复读取文件和grep搜索来探索代码库,每次查询消耗数千token却缺乏结构理解。我们提出Codebase-Memory,一个基于Model Context Protocol (MCP)构建持久化、Tree-Sitter型知识图谱的开源系统,通过多阶段流水线(含并行工作池、调用图遍历、影响分析和社区发现)解析66种编程语言。在31个真实仓库上的评估显示,Codebase-Memory以文件探索代理1/10的token消耗和2.1倍的工具调用次数,达到83%的答案质量(对比92%)。对于中心节点检测与调用者排名等图原生查询,它在31种语言中的19种上达到或超越探索代理的表现。

0
下载
关闭预览

相关内容

大型语言模型(LLM)赋能的知识图谱构建:综述
专知会员服务
56+阅读 · 2025年10月24日
深度学习文本分类方法综述(代码)
中国人工智能学会
28+阅读 · 2018年6月16日
【推荐】用TensorFlow实现LSTM社交对话股市情感分析
机器学习研究会
11+阅读 · 2018年1月14日
手把手教你入门使用tf-slim库 | 回顾
AI研习社
12+阅读 · 2017年12月9日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
41+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
VIP会员
相关主题
最新内容
反制无人机:乌克兰提供的五点启示
专知会员服务
9+阅读 · 9月23日
《各指挥层级均亟需红队能力》报告
专知会员服务
8+阅读 · 9月23日
《航电任务系统框架(FAMOS)》50页报告
专知会员服务
5+阅读 · 9月22日
《对抗行动中的人工智能与自主性》智库报告
专知会员服务
9+阅读 · 9月22日
《从数据到胜利:战争中的分析优势之争》
专知会员服务
11+阅读 · 9月22日
战争不仅需要机器人:人类仍不可或缺
专知会员服务
6+阅读 · 9月21日
《描绘美国防部创新基础设施的未来蓝图》100页
专知会员服务
11+阅读 · 9月21日
相关基金
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
41+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员