HyRACC: A Hybrid Retrieval-Augmented Framework for More Efficient Code Completion
Retrieval-Augmented Generation (RAG) approaches have significantly advanced code completion tasks, addressing limitations like the use of updated third-party libraries and new project dependencies. However, existing RAG methods often face challenges in balancing retrieval costs and completion accuracy. In this paper, we introduce HyRACC, a hybrid retrieval-augmented framework designed to enhance code completion efficiency. HyRACC incorporates a novel approach that uses hybrid databases at both block-level and token-level, coupled with a two-step retrieval scheme. This structure not only ensures high retrieval accuracy but also boosts response speed and reduces storage requirements. Our experimental results demonstrate that HyRACC improves code completion accuracy while optimizing latency and storage usage. Remarkably, HyRACC operates independently of model parameters, which facilitates its integration with various models and domains. This flexibility and efficiency make HyRACC particularly suitable for integration into plugins or local deployment, meeting diverse user needs for personalized code completion.
Authors
- Bin Luo (ORCID: https://orcid.org/0000-0002-9036-0063)
- Yijun Feng (ORCID: https://orcid.org/0000-0002-7118-7509)
- J. S. Shang (ORCID: https://orcid.org/0009-0004-9818-0763)
- C. Li
Institutions
- Nanjing University (CN)
Publication Details
- Published
- 2025-04-27
- DOI
- https://doi.org/10.1109/forge66646.2025.00013
- Primary Topic
- Natural Language Processing Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00