EUVIMEDEUVIMED entdecken
Open Access · CC BY-SA 4.0

Prompt Augmentation with Context at Repository Scale for Code Summarization with the Cache-Augmented Generation Paradigm

Erwin Hartanto, Maria Seraphina Astriani

Equivalent: Jurnal Ilmiah Sosial Teknik · 06.11.2026 · 8 (5) · 2226-2336

DOI: 10.59261/jequi.v8i5.472 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Equivalent: Jurnal Ilmiah Sosial Teknik, online erschienen am 06.11.2026. Verfasst von Erwin Hartanto und 1 weiteren Autor:innen. Der Volltext ist frei zugänglich (Open Access, CC BY-SA 4.0).

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Background

Code summarization is a fundamental aspect of software development and maintenance. However, the performance of large language models (LLMs) on this task can still be improved through prompt augmentation techniques, including Cache-Augmented Generation (CAG), which remains largely unexplored in the context of repository-level code.

Objective

This study systematically and empirically evaluates the effectiveness of CAG for code summarization when repository-level code structure is provided as context. Its performance is compared with that of Retrieval-Augmented Generation (RAG) and a base model.

Methods

This quantitative experimental study used the Llama 3.2 3B Instruct model on a sample of the CodeSearchNet dataset grouped by Python project repository. The three methods were evaluated and compared using three metrics: Summary-level Semantic Similarity (SIDE), Time to First Token (TTFT), and BERTScore.

Results

CAG achieved the lowest reported TTFT and a marginally higher BERTScore F1 score, whereas RAG achieved the highest SIDE score. Specifically, RAG attained a mean SIDE score of 0.596 and a mean BERTScore F1 score of 0.801. CAG achieved a mean TTFT of 0.188 seconds, considerably faster than RAG (2.680 seconds) and the base model (1.377 seconds).

Conclusion

Preloading comprehensive code context into the LLM's context window is effective for producing semantically aligned code summaries with minimal latency. However, CAG has a notable limitation: its cache must be updated when new information needs to be incorporated.

Zitieren

APA

Hartanto, E., & Astriani, M. S. (2026). Prompt Augmentation with Context at Repository Scale for Code Summarization with the Cache-Augmented Generation Paradigm. Equivalent: Jurnal Ilmiah Sosial Teknik, 8(5), 2226-2336. https://doi.org/10.59261/jequi.v8i5.472

Vancouver

Hartanto E, Astriani MS. Prompt Augmentation with Context at Repository Scale for Code Summarization with the Cache-Augmented Generation Paradigm. Equivalent: Jurnal Ilmiah Sosial Teknik. 2026;8(5):2226-2336. doi:10.59261/jequi.v8i5.472

BibTeX
@article{Hartanto2026,
  author = {Hartanto, Erwin and Astriani, Maria Seraphina},
  title = {Prompt Augmentation with Context at Repository Scale for Code Summarization with the Cache-Augmented Generation Paradigm},
  journal = {Equivalent: Jurnal Ilmiah Sosial Teknik},
  year = {2026},
  volume = {8},
  number = {5},
  pages = {2226--2336},
  doi = {10.59261/jequi.v8i5.472}
}
Kostenlos starten →