Enhancing Commit Message Generation in Software Repositories: A RAG-Based Approach

Creating clear and detailed commit messages manually is both time-consuming and prone to inconsistency. Existing automated methods, such as rule-based templates, retrieval-based systems, and neural sequence-to-sequence models, often fail to capture the full context of code changes, resulting in incomplete or inaccurate messages. To overcome these limitations, we introduce a Retrieval-Augmented Generation (RAG) framework that combines a pretrained retriever with transformer-based generators (BART and T5). Our approach builds a comprehensive knowledge base of code diffs and commit messages, incorporating relevant external context through joint end-to-end training. The dataset was sourced from the top GitHub repositories and curated using three key filtering and cleaning steps: (1) excluding non-target programming languages via regular expressions, (2) detecting the presence of “What” and “Why” information in commit messages with a Bidirectional LSTM model, and (3) manually evaluating high-quality messages with expert assistance. Experiments on curated datasets in Python, JavaScript, and Java demonstrate that our BART-based configuration significantly improves BLEU, METEOR, and ROUGE scores compared to existing methods, with the RAG-based models consistently outperforming other approaches across all evaluation metrics.

Authors

Institutions

Publication Details

Published
2025-05-29
DOI
https://doi.org/10.1109/sera65747.2025.11154546
Citations
1
Primary Topic
Software System Performance and Reliability
Type
article
Field-Weighted Citation Impact
1.49
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Enhancing Commit Message Generation in Software Repositories: A RAG-Based Approach

Abbas Heydarnoori, Mehdi Yadollahi, Iman Khazrak
1 citations
Software System Performance and Reliability
1.49
article

Enhancing Commit Message Generation in Software Repositories: A RAG-Based Approach

Abbas Heydarnoori, Mehdi Yadollahi, Iman Khazrak
article en
1 citations

Abstract

Creating clear and detailed commit messages manually is both time-consuming and prone to inconsistency. Existing automated methods, such as rule-based templates, retrieval-based systems, and neural sequence-to-sequence models, often fail to capture the full context of code changes, resulting in incomplete or inaccurate messages. To overcome these limitations, we introduce a Retrieval-Augmented Generation (RAG) framework that combines a pretrained retriever with transformer-based generators (BART and T5). Our approach builds a comprehensive knowledge base of code diffs and commit messages, incorporating relevant external context through joint end-to-end training. The dataset was sourced from the top GitHub repositories and curated using three key filtering and cleaning steps: (1) excluding non-target programming languages via regular expressions, (2) detecting the presence of “What” and “Why” information in commit messages with a Bidirectional LSTM model, and (3) manually evaluating high-quality messages with expert assistance. Experiments on curated datasets in Python, JavaScript, and Java demonstrate that our BART-based configuration significantly improves BLEU, METEOR, and ROUGE scores compared to existing methods, with the RAG-based models consistently outperforming other approaches across all evaluation metrics.

Bowling Green State University (US)
Openalex Percentile: Top 13%
Software System Performance and Reliability
1.49
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Enhancing Commit Message Generation in Software Repositories: A RAG-Based Approach — Abbas Heydarnoori, Mehdi Yadollahi, et al. · (2025) | TGRS Research Map | TGRS