paper-with-me

홈 › Papers

Impact-driven Context Filtering For Cross-file Code Completion

2025-08-08 · Yanzhou Li, Shangqing Liu, Kangjie Chen, Tianwei Zhang, Yang Liu arxiv

Retrieval-augmented generation (RAG) has recently demonstrated considerable potential for repository-level code completion, as it integrates cross-file knowledge with in-file preceding code to provide comprehensive contexts for generation. To better understand the contribution of the retrieved cross-file contexts, we introduce a likelihood-based metric to evaluate the impact of each retrieved code chunk on the completion. Our analysis reveals that, despite retrieving numerous chunks, only a small subset positively contributes to the completion, while some chunks even degrade performance. To address this issue, we leverage this metric to construct a repository-level dataset where each retrieved chunk is labeled as positive, neutral, or negative based on its relevance to the target completion. We then propose an adaptive retrieval context filtering framework, CODEFILTER, trained on this dataset to mitigate the harmful effects of negative retrieved contexts in code completion. Extensive evaluation on the RepoEval and CrossCodeLongEval benchmarks demonstrates that CODEFILTER consistently improves completion accuracy compared to approaches without filtering operations across various tasks. Additionally, CODEFILTER significantly reduces the length of the input prompt, enhancing computational efficiency while exhibiting strong generalizability across different models. These results underscore the potential of CODEFILTER to enhance the accuracy, efficiency, and attributability of repository-level code completion.

📄 PDF Abstract BibTeX arXiv:2508.05970

Code (0)

등록된 구현이 없습니다.

Tasks

Computational EfficiencyCode Completion

Similar Papers 제목 키워드 기반

Correctness-Aware Repository Filtering Under Maximum Effective Context Window Constraints

2026-05-14 · Shweta Mishra arxiv

Context window efficiency is a practical constraint in large language model (LLM)-based developer tools. Paulsen [12] shows that all tested models degrade in accuracy well before their advertised context limits the Maxim…

Semantic Retrieval

Filtering Discomforting Recommendations with Large Language Models

2024-10-07 · Jiahao Liu, YiYang Shao, Peng Zhang, Dongsheng Li 외

Personalized algorithms can inadvertently expose users to discomforting recommendations, potentially triggering negative consequences. The subjectivity of discomfort and the black-box nature of these algorithms make it c…

Language ModelingLanguage ModellingLarge Language Model

Non-average price impact in order-driven markets

2021-10-02 · Claudio Bellani, Damiano Brigo, Mikko Pakkanen, Leandro Sanchez-Betancourt

We present a measurement of price impact in order-driven markets that does not require averages across executions or scenarios. Given the order book data associated with one single execution of a sell metaorder, we measu…

Clustering

Attention Mechanism and Heuristic Approach: Context-Aware File Ranking Using Multi-Head Self-Attention

2026-01-07 · Pradeep Kumar Sharma, Shantanu Godbole, Sarada Prasad Jena, Hritvik Shrivastava arxiv

The identification and ranking of impacted files within software reposi-tories is a key challenge in change impact analysis. Existing deterministic approaches that combine heuristic signals, semantic similarity measures,…

Semantic Similarity

Active Inference with Reusable State-Dependent Value Profiles

2025-12-03 · Jacob Poschl arxiv

Adaptive behavior in volatile environments requires agents to switch among value-control regimes across latent contexts, but maintaining separate preferences, policy biases, and action-confidence parameters for every sit…