Creative and correct: Requesting diverse code solutions from AI

AI foundation models have the capability to produce a wide array of responses to a single prompt, a feature that is highly beneficial in software engineering to generate diverse code solutions. However, this advantage introduces a significant trade-off between diversity and correctness. In software...

Full description

Saved in:
Bibliographic Details
Main Authors: BLYTH, Scott, WAGNER, Markus, TREUDE, Christoph
Format: text
Language:English
Published: Institutional Knowledge at Singapore Management University 2024
Subjects:
Online Access:https://ink.library.smu.edu.sg/sis_research/8959
https://ink.library.smu.edu.sg/context/sis_research/article/9962/viewcontent/3650105.3652302_pvoa_cc_by.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Singapore Management University
Language: English
id sg-smu-ink.sis_research-9962
record_format dspace
spelling sg-smu-ink.sis_research-99622024-07-19T08:35:13Z Creative and correct: Requesting diverse code solutions from AI BLYTH, Scott WAGNER, Markus TREUDE, Christoph AI foundation models have the capability to produce a wide array of responses to a single prompt, a feature that is highly beneficial in software engineering to generate diverse code solutions. However, this advantage introduces a significant trade-off between diversity and correctness. In software engineering tasks, diversity is key to exploring design spaces and fostering creativity, but the practical value of these solutions is heavily dependent on their correctness. Our study systematically investigates this trade-off using experiments with HumanEval tasks, exploring various parameter settings and prompting strategies. We assess the diversity of code solutions using similarity metrics from the code clone community. The study identifies combinations of parameters and strategies that strike an optimal balance between diversity and correctness, situated on the Pareto front of this trade-off space. These findings offer valuable insights for software engineers on how to effectively use AI foundation models to generate code solutions that are diverse and accurate 2024-04-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/8959 info:doi/10.1145/3650105.3652302 https://ink.library.smu.edu.sg/context/sis_research/article/9962/viewcontent/3650105.3652302_pvoa_cc_by.pdf http://creativecommons.org/licenses/by/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Foundation models correctness creativity Artificial Intelligence and Robotics Software Engineering
institution Singapore Management University
building SMU Libraries
continent Asia
country Singapore
Singapore
content_provider SMU Libraries
collection InK@SMU
language English
topic Foundation models
correctness
creativity
Artificial Intelligence and Robotics
Software Engineering
spellingShingle Foundation models
correctness
creativity
Artificial Intelligence and Robotics
Software Engineering
BLYTH, Scott
WAGNER, Markus
TREUDE, Christoph
Creative and correct: Requesting diverse code solutions from AI
description AI foundation models have the capability to produce a wide array of responses to a single prompt, a feature that is highly beneficial in software engineering to generate diverse code solutions. However, this advantage introduces a significant trade-off between diversity and correctness. In software engineering tasks, diversity is key to exploring design spaces and fostering creativity, but the practical value of these solutions is heavily dependent on their correctness. Our study systematically investigates this trade-off using experiments with HumanEval tasks, exploring various parameter settings and prompting strategies. We assess the diversity of code solutions using similarity metrics from the code clone community. The study identifies combinations of parameters and strategies that strike an optimal balance between diversity and correctness, situated on the Pareto front of this trade-off space. These findings offer valuable insights for software engineers on how to effectively use AI foundation models to generate code solutions that are diverse and accurate
format text
author BLYTH, Scott
WAGNER, Markus
TREUDE, Christoph
author_facet BLYTH, Scott
WAGNER, Markus
TREUDE, Christoph
author_sort BLYTH, Scott
title Creative and correct: Requesting diverse code solutions from AI
title_short Creative and correct: Requesting diverse code solutions from AI
title_full Creative and correct: Requesting diverse code solutions from AI
title_fullStr Creative and correct: Requesting diverse code solutions from AI
title_full_unstemmed Creative and correct: Requesting diverse code solutions from AI
title_sort creative and correct: requesting diverse code solutions from ai
publisher Institutional Knowledge at Singapore Management University
publishDate 2024
url https://ink.library.smu.edu.sg/sis_research/8959
https://ink.library.smu.edu.sg/context/sis_research/article/9962/viewcontent/3650105.3652302_pvoa_cc_by.pdf
_version_ 1814047696960356352