상세 보기
Late Code Chunking: A Code Chunking Strategy for Repository-Level Code Completion
- Oh, Seungmin;
- Lee, Eunseok
WEB OF SCIENCE
0초록
This paper introduces Late Code Chunking (LC2), a chunking strategy designed to improve the semantic understanding of code segments for Large Language Models (LLMs). Repository-level code completion requires predicting the completion of unfinished code by leveraging cross-file context spread across a repository. However, when retrieved fragments have missing semantics-the loss of structural or behavioral information during chunking-LLMs struggle to interpret the target code. To address this, LC2 refines retrieved chunks by constructing a dual context: a "Code Retrieval Context" optimized for similarity-based search, and a "Code Comprehension Context" that serves as a late enrichment step through context expansion and augmentation. This dual-context design reduces information loss due to chunking and enhances the ability of LLMs to utilize retrieved code. Additionally, we introduce an Asymmetric Query-Chunk Sizing strategy to further optimize retrieval quality by minimizing query noise. Our experiments demonstrate that LC2 provides robust performance gains, achieving a statistically significant 19.7% improvement in Exact Match accuracy on the CrossCodeEval benchmark compared to the best existing chunking method.
- 제목
- Late Code Chunking: A Code Chunking Strategy for Repository-Level Code Completion
- 저자
- Oh, Seungmin; Lee, Eunseok
- 발행일
- 2026
- 유형
- Proceedings Paper
- 저널명
- PROCEEDINGS OF THE 64TH ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, VOL 2: SHORT PAPERS
- 페이지
- 780 ~ 786
- 언어
- ENG
- 출판사
- ASSOC COMPUTATIONAL LINGUISTICS-ACL
- 발행국가
- 미국
- 분량
- 7 페이지