Reverse Engineering User Stories from Code using Large Language Models

Mohamed Ouf, Haoyu Li, Michael Zhang, Mariam Guizani
9/23/2025
cs.SEcs.AI

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

User stories are essential in agile development, yet often missing or outdated in legacy and poorly documented systems. We investigate whether large language models (LLMs) can automatically recover user stories directly from source code and how prompt design impacts output quality. Using 1,750 annotated C++ snippets of varying complexity, we evaluate five state-of-the-art LLMs across six prompting strategies. Results show that all models achieve, on average, an F1 score of 0.8 for code up to 200 NLOC. Our findings show that a single illustrative example enables the smallest model (8B) to match the performance of a much larger 70B model. In contrast, structured reasoning via Chain-of-Thought offers only marginal gains, primarily for larger models.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ouf2025reverse,
  title  = {Reverse Engineering User Stories from Code using Large Language Models},
  author = {Mohamed Ouf and Haoyu Li and Michael Zhang and Mariam Guizani},
  year   = {2025},
  eprint = {2509.19587},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.19587v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.19587.svg)](https://codeofpaper.com/paper/2509.19587)

Discussion