arXiv:2606.22906cs.SEcs.AI2026-06被引 1

通过两阶段框架从代码库中恢复任务级上下文,提升复杂编程任务理解能力。

From Fragments to Paths: Task-Level Context Recovery for Large Industrial Codebases

论文配图:From Fragments to Paths: Task-Level Context Recovery for Large Industrial Codebases
图 1 · 摘自论文原文
  • 采用定位-推断双阶段框架,基于多关系代码结构定位关键任务锚点
  • 在27个中等规模任务上优于5个基线,无需离线预处理
  • 在生产级代码库中实现1.6%-9.2%的召回率提升,适合工业级代码智能助手

大型语言模型在软件工程任务中表现强劲,但理解大型工业代码库仍具挑战。现有方法多仅检索局部片段,难以恢复复杂任务所需的全局上下文。本文提出DeepDiscovery,一种面向大规模工业代码库的任务级仓库理解方法。该方法采用两阶段「定位-推断」框架,在预算约束下,基于多关系仓库结构定位高置信度任务锚点,并恢复更广泛的任务相关上下文。在受控的方法级评估、组织内部工业仓库理解场景及SWE-bench Verified的端到端评估中,DeepDiscovery持续提升任务相关文件恢复效果与下游软件工程性能。在27个中等规模任务上,其文件恢复质量超越五个代表性基线,且无需离线预处理。在来自生产级集成代码库生态系统的组织内工业任务中(包含27个中等规模任务和40个大规模任务),DeepDiscovery在多个AI编程系统中提升了全召回率,大子项目绝对提升1.6至9.2个百分点,中等规模子项目提升2.5至7.4个百分点。在SWE-bench Verified的控制端到端评估中,搭载DeepDiscovery的系统达到78.6%的求解率,比基线高出8.2个百分点。结果表明,更强的任务级仓库理解可显著提升编码代理在复杂软件工程任务中的表现。

原文摘要 · Abstract (English)

Large language models have shown strong performance on software engineering (SE) tasks, yet understanding large industrial repositories remains challenging. Existing methods often retrieve only local fragments and fail to recover the broader task-relevant context needed for complex repository-level tasks. We present DeepDiscovery, a task-level repository-understanding method for large industrial codebases. DeepDiscovery uses a two-stage \textit{Location--Inference} framework to localize high-confidence task anchors and recover broader task-relevant context over multi-relational repository structure under budget constraints. Across controlled method-level evaluation, organization-internal industrial repository-understanding scenarios, and end-to-end evaluation on SWE-bench Verified, DeepDiscovery consistently improves task-relevant file recovery and downstream SE performance. On 27 medium-scale tasks, DeepDiscovery achieves the best file recovery quality among five representative baselines without offline preprocessing. On organization-internal industrial tasks from a production-scale integrated codebase ecosystem, including 27 medium-scale tasks and 40 large-scale tasks, DeepDiscovery improves Full Recall Rate across multiple AI coding systems, with absolute gains ranging from 1.6 to 9.2 percentage points on large subprojects and from 2.5 to 7.4 percentage points on medium-scale subprojects. In a controlled end-to-end evaluation on SWE-bench Verified, a system equipped with DeepDiscovery achieves a 78.6\% Solve Rate, outperforming the corresponding baseline by 8.2 percentage points. These results suggest that stronger task-level repository understanding can improve coding-agent performance on complex SE tasks.

代码理解大模型工业级代码上下文恢复

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。