Prompting in the Wild: An Empirical Study of Prompt Evolution in Software Repositories

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Tafreshipour, Mahan, Imani, Aaron, Huang, Eric, Almeida, Eduardo, Zimmermann, Thomas, Ahmed, Iftekhar
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866913645674364928
author Tafreshipour, Mahan
Imani, Aaron
Huang, Eric
Almeida, Eduardo
Zimmermann, Thomas
Ahmed, Iftekhar
author_facet Tafreshipour, Mahan
Imani, Aaron
Huang, Eric
Almeida, Eduardo
Zimmermann, Thomas
Ahmed, Iftekhar
contents The adoption of Large Language Models (LLMs) is reshaping software development as developers integrate these LLMs into their applications. In such applications, prompts serve as the primary means of interacting with LLMs. Despite the widespread use of LLM-integrated applications, there is limited understanding of how developers manage and evolve prompts. This study presents the first empirical analysis of prompt evolution in LLM-integrated software development. We analyzed 1,262 prompt changes across 243 GitHub repositories to investigate the patterns and frequencies of prompt changes, their relationship with code changes, documentation practices, and their impact on system behavior. Our findings show that developers primarily evolve prompts through additions and modifications, with most changes occurring during feature development. We identified key challenges in prompt engineering: only 21.9% of prompt changes are documented in commit messages, changes can introduce logical inconsistencies, and misalignment often occurs between prompt changes and LLM responses. These insights emphasize the need for specialized testing frameworks, automated validation tools, and improved documentation practices to enhance the reliability of LLM-integrated applications.
format Preprint
id arxiv_https___arxiv_org_abs_2412_17298
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Prompting in the Wild: An Empirical Study of Prompt Evolution in Software Repositories
Tafreshipour, Mahan
Imani, Aaron
Huang, Eric
Almeida, Eduardo
Zimmermann, Thomas
Ahmed, Iftekhar
Software Engineering
The adoption of Large Language Models (LLMs) is reshaping software development as developers integrate these LLMs into their applications. In such applications, prompts serve as the primary means of interacting with LLMs. Despite the widespread use of LLM-integrated applications, there is limited understanding of how developers manage and evolve prompts. This study presents the first empirical analysis of prompt evolution in LLM-integrated software development. We analyzed 1,262 prompt changes across 243 GitHub repositories to investigate the patterns and frequencies of prompt changes, their relationship with code changes, documentation practices, and their impact on system behavior. Our findings show that developers primarily evolve prompts through additions and modifications, with most changes occurring during feature development. We identified key challenges in prompt engineering: only 21.9% of prompt changes are documented in commit messages, changes can introduce logical inconsistencies, and misalignment often occurs between prompt changes and LLM responses. These insights emphasize the need for specialized testing frameworks, automated validation tools, and improved documentation practices to enhance the reliability of LLM-integrated applications.
title Prompting in the Wild: An Empirical Study of Prompt Evolution in Software Repositories
topic Software Engineering
url https://arxiv.org/abs/2412.17298