How well language models find trace links
Language models are meant to find missing links between requirements and code. Recent studies show where this works and where it stops.
Published on
Finding missing or outdated links (trace links) between requirements, design, code and tests after the fact is called traceability link recovery, or TLR, in the research literature. For a long time the methods relied on word similarity: a requirement and a class that use the same terms probably belong together. Over the past two years several papers have put a language model into that process, two of them with data from industry. The results are encouraging, but how good they are depends mainly on the search in front of the model and on the requirements themselves.
Retrieve first, then judge
Most approaches work in two stages. A similarity search first picks the candidates that best match each requirement, usually via embeddings. A language model then decides for each candidate whether a link really exists. This is retrieval-augmented generation (RAG). Whatever the model suggests should then be reviewed by a person.
A well-known example is LiSSA from the Karlsruhe Institute of Technology, presented at ICSE 2025. The authors tried it on three tasks: requirements to code, architecture documentation to code, and architecture documentation to architecture models. Their verdict is split. On the code-related tasks the approach "can significantly outperform the state-of-the-art"; at the same time, further research is needed before such approaches are "applicable in practice" (Fuchß et al., 2025). Table III of the paper shows why. For requirements to code, LiSSA in its best configuration on average was ahead of the classic vector space model (VSM) and latent semantic indexing (LSI) on four of five datasets, even with those running at their best threshold. On the fifth (SMOS) it was well behind, with an F1 of 0.294 against 0.422. F1 is the harmonic mean of precision and recall.
The search sets the limit
How much is lost before the language model even gets to judge? Banerjee, Abualhaija, Bianculli and Briand measured this in a recent preprint (Banerjee et al., 2026). On three well-known datasets, the search in their re-implementation of LiSSA found only part of the correct links: 248 of 308 on eTour (80.5%), 152 of 286 on iTrust (53.1%) and 176 of 393 on Dronology (44.8%). A model that only sees these candidates cannot do better.
So the authors let the model read the whole repository in one go, with no search beforehand. With GPT-5, recall rises to 80.9%, 38.6 percentage points more than their re-implementation of LiSSA. Precision drops by 25.8 points to 17.8%, which means roughly one suggestion in six is correct. A variant in which two model roles argue for and against a link and a third decides reaches 24.5% precision at 71.0% recall. The measure is F2, which weights recall more heavily than precision. That is a choice: it assumes a missed link costs more than a wrong suggestion that someone rejects. Whether that holds depends on who reviews the suggestions and how many there are.
How the requirements are written
Tobias Hey (KIT) and Julian Frattini (Chalmers) turned to the requirements themselves. They annotated 189 use cases from eTour and iTrust for 28 types of quality defect and measured how they affect five TLR methods (Hey and Frattini, 2026). Of the 28 defect types, 16 varied enough across the use cases to be analysed, and 13 of them showed at least a weakly significant effect. Some defects hurt, such as sentences that do not start with a noun phrase. Others help, such as use cases that include implementation details. That is awkward for requirements engineering: what makes a requirement worse by the discipline's own rules can make it easier for a machine to map to code. The methods also respond differently, and according to the authors the best choice depends on the quality of the dataset.
Two reports from industry
Most results come from a handful of public datasets, many of them small and old. That makes two papers with company data more interesting.
TVR, developed at the University of Ottawa with authors from Aptiv and Wind River, checks links between stakeholder and system requirements of a vehicle, specifically requirements for diagnostic trouble codes (Niu et al., 2025). It was evaluated on 2,132 requirement pairs. With Claude 3.5 Sonnet, TVR reached 98.87% accuracy in validating existing links and 85.50% correctness in recovering missing ones. The task is narrow, though. All the requirements come from one system and are alike in kind and structure.
Huang, Hayashi and colleagues from the Institute of Science Tokyo and YSL Solution looked at links between requirements that contain images (Huang et al., 2026). In their Japanese industrial data, 42.1% of the links involved an image. Their approach, which retrieves text and image candidates separately and has a vision-language model judge them, reached an F1 of 0.310; a re-implemented text-only approach reached 0.114. The authors again see the limit in the search: for images it often failed to find the matching text requirements.
Before trying it in-house
Measure the search on its own first. If it delivers only half of the correct candidates, no better model behind it will help. It is also worth settling up front how many wrong suggestions the reviewers can handle. A recall of 80% at a precision below 20% means something different in a project with thousands of requirements than in the eTour dataset with its 58 use cases.
The figures from the literature transfer poorly, too. Hey and Frattini show that the way requirements are written already shifts the result; TVR shows high values for one narrowly defined kind of requirement. Alturayeif, Ahmad and Hassine also point out that performance depends not only on the model but "critically on the quality of prompt engineering" (Alturayeif et al., 2026). To know how well a method works on your own data, you therefore need a sample of known links from your own repository.
Then there is the question of where the data goes. It leaves the building as soon as a hosted model does the judging. The Tokyo group could not send the industrial requirements to external services and ran open-weight models locally, on a single GPU. For many companies, the fact that this is possible is the more important news.
Sources
- Fuchß, D.; Hey, T.; Keim, J.; Liu, H.; Ewald, N.; Thirolf, T.; Koziolek, A.: LiSSA: Toward Generic Traceability Link Recovery through Retrieval-Augmented Generation. ICSE 2025.
- Banerjee, S.; Abualhaija, S.; Bianculli, D.; Briand, L.: Rethinking Requirement-to-Code Traceability Through Single-Agent and Multi-Agent Approaches. Preprint, arXiv, 2026.
- Hey, T.; Frattini, J.: How Requirements Quality Makes (or Breaks) Traceability Link Recovery. Preprint, arXiv, 2026.
- Niu, F.; Pan, R.; Briand, L. C.; Hu, H.; Koravadi, K.: TVR: Automotive System Requirements Traceability Validation and Recovery Through Retrieval-Augmented Generation. Preprint, arXiv, version 2 of 15 June 2025.
- Huang, H.; Hayashi, S.; Kohata, K.; Kim, M.; Kurihara, Y.: Multimodal Requirements Traceability Link Recovery in Industrial Settings. Preprint, arXiv, 2026.
- Alturayeif, N.; Ahmad, I.; Hassine, J.: TraceLLM: Leveraging Large Language Models with Prompt Engineering for Enhanced Requirements Traceability. Preprint, arXiv, 1 February 2026.