跳到正文
arXiv cs.AI· Xutian Li, Bo Xiong, Yifeng Zhu, Runbang Yan, Yanzhen Zou, Lu Zhang, Bing Xie·· 5 小时前AI 评分40

FeatLens:面向仓库级代码生成的特征引导依赖检索方法

FeatLens: Feature-Guided Dependency Retrieval for Repository-Level Code Generation

AI 导读

论文提出 FeatLens,一种面向仓库级代码生成的特征引导依赖检索方法:先离线建立自然语言功能描述与函数级代码实体的索引,再通过依赖种子扩展及语义与结构启发式筛选生成上下文,且在线检索阶段无需 LLM 调用。

正文 · 原文

View PDF HTML (experimental)

Abstract:Retrieving task-relevant code dependencies is critical for repository-level code generation. Existing approaches obtain dependency context through similarity-based retrieval, repository graphs, or LLM-driven exploration. A central challenge is to identify the dispersed dependencies needed to implement a functional requirement, rather than merely retrieve broadly related code. This paper presents FeatLens, a feature-guided dependency retrieval approach for repository-level code generation. FeatLens first builds an offline index linking natural-language feature descriptions to function-level code entities. Given a task requirement and target function location, it selects relevant features and constructs dependency seeds. It then expands the seed graph and applies semantic and structural heuristics to select dependencies for inclusion in the generation context. Experiments on DevEval and EvoCodeBench show that FeatLens achieves the highest dependency recall among the evaluated baselines at each fixed retrieval budget, reaching DR@15 values of 0.527 and 0.529, respectively. On DevEval, the retrieved context supports the highest non-oracle Pass@1 with both DeepSeek-V3.2 and GPT-5-mini. These results are obtained without LLM calls in the online dependency retrieval stage.
Comments: under review progress
Subjects: Software Engineering (cs.SE); Artificial Intelligence (cs.AI)
Cite as: arXiv:2609.26480 [cs.SE]
  (or arXiv:2609.26480v2 [cs.SE] for this version)
  https://doi.org/10.48550/arXiv.2609.26480

arXiv-issued DOI via DataCite

Submission history

From: Xutian Li [view email]
[v1] Tue, 22 Sep 2026 14:20:46 UTC (895 KB)
[v2] Wed, 28 Oct 2026 09:20:54 UTC (1,267 KB)

来源:arXiv cs.AI · arxiv.org