@inproceedings{he-etal-2026-codepromptzip,
title = "{CODEPROMPTZIP}: Code-specific Prompt Compression for Retrieval-Augmented Generation in Coding Tasks with {LM}s",
author = "He, Pengfei and
Wang, Shaowei and
Chen, Tse-Hsun",
editor = "Liakata, Maria and
Moreira, Viviane P. and
Zhang, Jiajun and
Jurgens, David",
booktitle = "Findings of the {A}ssociation for {C}omputational {L}inguistics: {ACL} 2026",
month = jul,
year = "2026",
address = "San Diego, California, United States",
publisher = "Association for Computational Linguistics",
url = "https://preview.aclanthology.org/ingest-acl/2026.findings-acl.1384/",
pages = "27811--27825",
ISBN = "979-8-89176-395-1",
abstract = "Retrieval-Augmented Generation (RAG) enhances code generation by incorporating retrieved code examples into prompts, but the resulting long-context inputs impose substantial memory and computational overhead. Existing prompt compression techniques are largely designed for natural language and fail to account for the structural and semantic properties of code, while also lacking fine-grained control over compression ratios. We propose CodePromptZip, a code-aware prompt compression framework for RAG that enables precise length control while preserving critical information. Motivated by type-aware ablation studies, CodePromptZip leverages static analysis to rank code tokens by information gain and applies a dynamic compression strategy to retain the most informative tokens under a given budget. For incomplete or unparsable code snippets, CodePromptZip employs a language-model-based compressor trained on analyzable samples and augmented with a copy mechanism to preserve key tokens. Extensive experiments on three code-related tasks demonstrate that CodePromptZip consistently outperforms entropy-based and distillation-based baselines, achieving improvements of 23.4{\%}, 28.7{\%}, and 8.7{\%}, respectively, while providing accurate control over compression ratios."
}Markdown (Informal)
[CODEPROMPTZIP: Code-specific Prompt Compression for Retrieval-Augmented Generation in Coding Tasks with LMs](https://preview.aclanthology.org/ingest-acl/2026.findings-acl.1384/) (He et al., Findings 2026)
ACL