Bachelor thesis
Cite …

Automated Prompt Engineering for Traceability Link Recovery

Abstract

Traceability link recovery (TLR) is an important task in software engineering that helps to establish and maintain trace links between different software artifacts. Traditional TLR methods often rely on information retrieval techniques to identify candidate links. More novel approaches use large language models (LLMs) to improve the accuracy and retrieval rates of TLR. However, to utilize LLMs effectively, it is crucial to design appropriate prompts. This process of prompt engineering is often done manually and often time-consuming, requiring significant expertise.

In this work, an automatic prompt engineering (APE) approach is proposed and realized to automate this task for TLR in the Linking Software System Artifacts (LiSSA) framework. Using feedback form previous iterations, LLMs are used to refine prompts. The approach is evaluated on five datasets from the requiremens-to-requirements task using three different LLMs. As a baseline, current classification prompts from the LiSSA framework are used.

The results show that the realized approach can improve the performance of TLR tasks. Furthermore, it is demonstrated that the best-performing optimized prompt for a dataset, in terms of F1-Score, also performs well on other datasets of the same task. As the optimized prompts yielded by this work can be used as fixed classification prompts, the APE algorithm is not required to be applied for every evaluation. Overall, this work contributes to the field of TLR by realizing an approach to APE using LLMs.

Further research can be conducted in order to explore more degrees of freedom for the APE algorithms. The APE approach can also be investigated in other TLR domains, with different models and new prompting strategies.