A Framework for Structurally Deterministic Pipeline Based Drafting and Quality Improvement of Software Requirements Specifications Using Language Models and Reinforcement Learning
A systematic approach to SRS generation in which input requirements from stakeholders are classified into semantically meaningful topics, followed by the construction of an initial skeleton document based on these topics, which is then incrementally expanded using reinforcement learning to improve consistency, completeness, and coverage.
Abstract
The process of authoring a Software Requirements Specification (SRS) document is a resource-intensive task in software development that requires coordination among multiple stakeholders and is often time-consuming, costly, and prone to human error. Latest advancements in artificial intelligence have enabled the generation of specification documents using Large Language Models (LLMs). However, such approaches still depend on manual prompt engineering and prompt optimization to extract relevant knowledge and do not consistently ensure structural coherence, completeness, and reliability. This paper presents a systematic approach to SRS generation in which input requirements from stakeholders are classified into semantically meaningful topics, followed by the construction of an initial skeleton document based on these topics. The document is then incrementally expanded using reinforcement learning to improve consistency, completeness, and coverage. The proposed approach also improves the dependability of the output by reducing hallucinations that may arise from the unstructured, raw nature of user inputs. The experimental evaluation of the proposed framework increases topic classification accuracy from 0.40–0.70 to 0.75–0.95 across six requirement topics, thereby improving document structure and generation quality. Compared with a ChatGPT Model 5.2 baseline, the framework achieved significant improvements in key text-generation metrics, including a 19.8% increase in ROUGE-L and an 11.8% increase in METEOR, while maintaining contextual relevance with an average semantic cross-similarity score of 0.615. These results indicate that the proposed method can produce SRS documents that are contextually reliable and structurally coherent while requiring less manual prompts such as requirements from analysts or stakeholders.
In fast-evolving software systems, effective 'natural language requirements parsing' and downstream change effect analysis capability across a multitude of codes represents low-hanging-fruit in this regard. We present a structured framework to deploy Large Language Models (LLMs) for automating two essential software engineering tasks, namely requirement interpretation and change impact analysis Utilizing the inherent understanding of semantics offered by transformer-based LLMs, the novel approach advances by converting vague and unstructured requirement documents into structured but machine-readable specifications to offer a direct traceability mapping from requirements to system components. Additionally, the framework leverages LLM-driven dependency analysis to predict and quantify how change effects percolate through connected modules which can minimize manual effort and human errors. This approach combines prompt engineering and retrieval-augmented generation (RAG) for domain-relevant accuracy plus fine-tuning techniques. On open-source and enterprise-grade software projects, experimental evaluations show that disambiguation accuracy, traceability precision, and change impact coverage of our approach are orders of magnitude better than state-of-the-art rule-based or static analysis tools. Notes: The results illustrate the application of LLMs at scale and demonstrate how these can alter software engineering workflows by removing bottlenecks (at a massive scale) at different stages of the software development lifecycle. In this research, we provide a generalizable pipeline that helps to bridge the gap from NLP advancements into practice for software lifecycle management.
Nithya Krishnan, Kumaran Ramanujam, Suresh Babu Narra et al.· 2026 International Conferenc...· 0 citations
SWE-RPG is introduced, a repository-level benchmark that combines executable patch evaluation with validated ground-truth references (GTs) for Requirement Clarification and Implementation Planning, and suggests implicit-requirement recovery as a key candidate direction for improving coding agents.
Xin Zhou, Chun-Yong Chong, Kisub Kim et al.· 0 citations
Automated code compliance checking in structural engineering remains difficult because practical systems must balance accuracy, maintainability, and deployment cost. Pure prompting with large language models is prone to hallucination and unstable numerical judgment, conventional retrieval-augmented generation may fail to assemble dispersed regulatory evidence, and ontology-heavy pipelines can be expensive to extend when codes evolve. We therefore propose a role-specialized retrieval-augmented generation framework composed of a deterministic Parser, a Reviewer guided by an Equilibrium Rule prompt, and a Critic that outputs a structured verdict. On a 211-case benchmark built from real-project building information modeling exports and expert review across slabs, beams, and columns, the framework achieves 96.68% overall accuracy, compared with 57.35% for zero-shot prompting, 79.15% for naive retrieval-augmented generation, 77.25% for naive retrieval-augmented generation with the Equilibrium Rule, and 89.10% for a re-implemented ontology- and rule-based baseline. The benchmark knowledge resources, retrieval corpus, and rule-supporting mappings are extracted from two Chinese national structural design codes covering concrete member design and structural loading. Ablation results suggest that the Equilibrium Rule and the Critic contribute most of the observed gain. We therefore position the framework as a decision-support approach for engineering compliance review rather than as a fully autonomous approval engine.
Code generation aims to automatically generate source code from task requirements and has attracted significant attention with the rapid advancement of large language models (LLMs). Despite remarkable progress, LLMs often struggle to generate correct code for complex software engineering tasks because task descriptions are frequently incomplete, ambiguous, or lack critical contextual information. Existing approaches primarily improve the capabilities of coding agents through more sophisticated tools, skills, and workflows, while largely overlooking the quality of the task requirements themselves. To address this limitation, we draw inspiration from software requirements engineering and propose WiseSpec, a novel requirements-driven agent framework for repository-level code generation. WiseSpec automatically constructs structured and information-rich requirements, assesses their quality through execution-based evaluation, and iteratively refines them to better guide code generation. Experimental results show that WiseSpec consistently outperforms all baselines, achieving an average improvement of 13.17% in %Resolved.
This work proposes LLM-based methods for verifying semantically complex NL requirements on static GUI prototypes and introduces a multimodal LLM-based agent for verifying complex functional and non-functional requirements in dynamic GUI applications through automatically generated and evaluated interaction trajectories.
Large language models (LLMs) have made substantial progress in code generation but still struggle with challenging programming tasks that require understanding rich natural language requirements. These requirements often specify problem goals, input/output formats, constraints, examples, and edge cases. Overlooking even one may produce executable but functionally incorrect code. Existing training-free methods mainly rely on prompting or agent-based workflows, while training-based methods typically optimize final code outputs. However, existing approaches provide limited supervision for learning the intermediate mapping from raw requirements to structured specifications and for grounding them in concrete implementation behavior. Consequently, models may omit critical constraints, and even when an explicit specification is produced, the implementation may fail to reflect it consistently. Motivated by this gap, we propose SpecCoder, a specification-aware two-stage training framework for code generation. SpecCoder first employs specification-guided SFT to train LLMs to derive structured specification analyses and generate code conditioned on them. It then introduces curriculum dual-task GRPO, which jointly optimizes specification-guided generation and discrimination to encourage stronger correspondence between specifications and code behavior. Experiments on APPS, CodeContests, and xCodeEval demonstrate the effectiveness of specification-aware training, with SpecCoder consistently improving both standalone code generation and agent-based workflows. Additional evaluations on BigCodeBench-Hard and ClassEval, alongside human evaluation and perturbation studies, further validate the role of structured specifications in guiding code generation and discrimination.
Yi-Xuan Li, Min Huang, Jia-Jing Wang et al.· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.