Conventional Commit Classification using Large Language Models and Prompt Engineering

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Quadir, H. M. Sazzad, Hasan, Sakib Al, Tawhid, Md. Nurul Ahad
Format: Preprint
Veröffentlicht: 2026
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866914527477497856
author Quadir, H. M. Sazzad
Hasan, Sakib Al
Tawhid, Md. Nurul Ahad
author_facet Quadir, H. M. Sazzad
Hasan, Sakib Al
Tawhid, Md. Nurul Ahad
contents Conventional commits provide a structured format for writing commit messages, which improves readability, software maintenance, and enables automation tools such as changelog generators and semantic versioning systems. Existing approaches to conventional commit classification typically rely on ML/DL models trained on large labeled datasets. In this paper, we investigated a training-free alternative by leveraging large language models (LLMs) through prompt engineering. Rather than building a task-specific classifier, we evaluate three prompting strategies, such as zero-shot, few-shot, and chain-of-thought, across three open-source LLMs of varying scale: Mistral-7B-Instruct, LLaMA-3-8B, and DeepSeek-R1-32B. Classification is performed directly on code diffs extracted from a balanced dataset of 3,200 commits mined from the InfluxDB repository, without any model fine-tuning. Our results show that few-shot prompting consistently achieves the highest accuracy, while chain-of-thought prompting does not yield additional gains for this classification task. Among the evaluated models, DeepSeek-R1-32B achieves the strongest overall performance, suggesting that model scale plays a meaningful role in conventional commit classification. These findings provide practical guidance for researchers and practitioners seeking to automate commit classification without the overhead of curating and maintaining labeled training data.
format Preprint
id arxiv_https___arxiv_org_abs_2605_02033
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Conventional Commit Classification using Large Language Models and Prompt Engineering
Quadir, H. M. Sazzad
Hasan, Sakib Al
Tawhid, Md. Nurul Ahad
Software Engineering
Artificial Intelligence
Conventional commits provide a structured format for writing commit messages, which improves readability, software maintenance, and enables automation tools such as changelog generators and semantic versioning systems. Existing approaches to conventional commit classification typically rely on ML/DL models trained on large labeled datasets. In this paper, we investigated a training-free alternative by leveraging large language models (LLMs) through prompt engineering. Rather than building a task-specific classifier, we evaluate three prompting strategies, such as zero-shot, few-shot, and chain-of-thought, across three open-source LLMs of varying scale: Mistral-7B-Instruct, LLaMA-3-8B, and DeepSeek-R1-32B. Classification is performed directly on code diffs extracted from a balanced dataset of 3,200 commits mined from the InfluxDB repository, without any model fine-tuning. Our results show that few-shot prompting consistently achieves the highest accuracy, while chain-of-thought prompting does not yield additional gains for this classification task. Among the evaluated models, DeepSeek-R1-32B achieves the strongest overall performance, suggesting that model scale plays a meaningful role in conventional commit classification. These findings provide practical guidance for researchers and practitioners seeking to automate commit classification without the overhead of curating and maintaining labeled training data.
title Conventional Commit Classification using Large Language Models and Prompt Engineering
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2605.02033