Skip to content
Conference

Dataset-Aware Prompting for Requirements-to-Code Traceability Link Recovery

Aug 2026 · 2026 6th International Conference on Computer Science and Blockchain (CCSB) · pp. 474-482 · 0 citations · 11 references

Abstract

Requirements-to-code traceability link recovery is a task in software maintenance, change impact analysis, and quality assurance. Existing information retrieval and large language model (LLM)-based approaches typically generate a candidate set of code artifacts for each requirement and then determine whether each requirement–code pair constitutes a valid trace link. However, in practical datasets, the candidate pool often contains many false positives caused by overlapping domain terms, utility classes, data access classes, and similar naming conventions, increasing the cost of subsequent human inspection.To address this problem, this paper proposes a dataset-aware prompting module (DAPM) for trace link classification. DAPM first constructs a dataset profile from the requirements and code artifacts of the target project. The profile captures domain terminology, naming patterns, architectural roles, decision rules, and false-positive risks. It is then incorporated into the prompt used to classify each candidate link, guiding the LLM to base its decisions on project-specific evidence rather than textual overlap alone.Experiments are conducted on three public requirements-to-code traceability datasets: iTrust, eAnci, and eTour. A frozen Top-20 candidate set is used as a reproducible operating point for downstream classification; it is not assumed to be an optimal cutoff. DAPM is compared with a no-LLM filtering baseline and a KISS prompting baseline. The results show that dataset-aware prompting consistently reduces false positives across all three datasets, decreasing them by 393, 331, and 217, respectively, compared with the KISS + v4-pro baseline. DAPM also improves macro- and micro-averaged F2 scores on iTrust and eTour. These findings indicate that dataset-aware contextual knowledge can improve LLM-based trace link classification, although recall degradation remains a challenge on some datasets.

View source

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.