Generating Privacy Stories From Software Documentation

Wilder Baldwin, Shashank Chintakuntla, Shreyah Parajuli, Ali Pourghasemi, Ryan Shanz +1 more
6/28/2025
cs.SEcs.AI

No confident code implementation found for this paper.

Abstract

Research shows that analysts and developers consider privacy as a security concept or as an afterthought, which may lead to non-compliance and violation of users' privacy. Most current approaches, however, focus on extracting legal requirements from the regulations and evaluating the compliance of software and processes with them.

Show full abstract

In this paper, we develop a novel approach based on chain-of-thought prompting (CoT), in-context-learning (ICL), and Large Language Models (LLMs) to extract privacy behaviors from various software documents prior to and during software development, and then generate privacy requirements in the format of user stories. Our results show that most commonly used LLMs, such as GPT-4o and Llama 3, can identify privacy behaviors and generate privacy user stories with F1 scores exceeding 0.8. We also show that the performance of these models could be improved through parameter-tuning. Our findings provide insight into using and optimizing LLMs for generating privacy requirements given software documents created prior to or throughout the software development lifecycle.

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. Any repos shown below are weak matches — 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{baldwin2025generating,
  title  = {Generating Privacy Stories From Software Documentation},
  author = {Wilder Baldwin and Shashank Chintakuntla and Shreyah Parajuli and Ali Pourghasemi and Ryan Shanz and Sepideh Ghanavati},
  year   = {2025},
  eprint = {2506.23014},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.23014v1}
}

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/2506.23014.svg)](https://codeofpaper.com/paper/2506.23014)

Discussion