arXiv Computation and Language
Oct 16

Enhancing Knowledge Density via Hierarchical Context Pruning for Retrieval-Augmented Repository-Level Code Completion

The paper introduces SaraCoder, a retrieval‑augmented framework that improves knowledge density for repository‑level code completion by pruning redundant context and selectively injecting cross‑file dependency definitions within a fixed token budget. It employs a Hierarchical Feature Optimization module to reduce an over‑complete candidate pool in four stages, freeing tokens for an External‑Aware Identifier Disambiguator. Experiments on CrossCodeEval and RepoEval‑Updated demonstrate that SaraCoder outperforms strong RAG baselines such as GraphCoder and Repocoder across multiple code LLMs without increasing token usage, and achieves synergistic gains when combined with other cross‑file methods.

By Xiaohan Chen, Xiang Chen, Yu Tian, Piji Li, Sheng-Jun Huang, Songcan Chen
arXiv AI
Jun 16

AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion

arXiv:2601. 19697v2 Announce Type: replace-cross Abstract: Repository-level code completion remains a challenging task for existing code large language models (code LLMs) due to their limited understanding of repository-specific context and domain knowledge.

By Tianyue Jiang, Yanli Wang, Yanlin Wang, Daya Guo, Ensheng Shi, Yuchi Ma, Jiachi Chen, Zibin Zheng