Enhancing Knowledge Density via Hierarchical Context Pruning for Retrieval-Augmented Repository-Level Code Completion
Read the original on arXiv Computation and Language →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.
Machine-generated by The Flow from the publisher's headline and feed description — not written or checked by a human. The full article lives at arXiv Computation and Language.