# Extracting Knowledge Graphs from User Stories using LangChain

**Authors:** Thayná Camargo da Silva  
**arXiv:** [2506.11020](https://arxiv.org/abs/2506.11020)  
**Date:** 2025-05-14  
**Summary page:** https://www.summarizepaper.com/en/arxiv-id/2506.11020v1/

## Key points

- Novel methodology for generating knowledge graphs from user stories using Large Language Models (LLMs)
- Addressing limitations of user stories in capturing overall system perspective in software development
- Proposal to extract structured data from user stories and model them into knowledge graphs for enhanced comprehension
- Development of LangChain framework and User Story Graph Transformer module for automating knowledge graph extraction process
- Importance of aligning software functionalities with user expectations for more effective and user-centric software development
- Acknowledgment of key contributors to the research, including Prof. Dr. Leen Lambers, Dr. Kate Revoredo, Dr. Sébastien Mosser, and Prof. Dr. Douglas Cunningham

## Summary

This Master's thesis presents a novel methodology for automatically generating knowledge graphs from user stories using the advanced capabilities of Large Language Models (LLMs). The research addresses the limitations of user stories in capturing the overall system perspective in software development. User stories are natural language descriptions of software requirements widely used in agile methodologies but often lack structured information for comprehensive system understanding. To overcome these challenges, the thesis proposes extracting structured data from user stories and modeling them into knowledge graphs. These visual and structured representations enhance data storage, analysis, and system comprehension. The LangChain framework serves as the basis for developing the User Story Graph Transformer module, which utilizes an LLM to accurately extract nodes and relationships from user stories. This innovative technique automates the knowledge graph extraction process through a script, streamlining the visualization and understanding of user requirements and domain concepts. An evaluation script with an annotated dataset is used to automate the assessment of knowledge graph accuracy. By improving alignment between software functionalities and user expectations, this method contributes to more effective and user-centric software development processes. The thesis acknowledges key contributors to the research including Prof. Dr. Leen Lambers, Dr. Kate Revoredo, Dr. Sébastien Mosser, and Prof. Dr. Douglas Cunningham for their support throughout the academic journey. plays a crucial role in defining software from a user's perspective; thus highlighting the significance of extracting structured information from user stories for creating coherent and manageable systems. Overall, this research provides valuable insights into utilizing LLMs for knowledge graph generation from user stories to enhance software development processes and improve system comprehension through structured representations of requirements.
