Automating the Detection of Requirement Dependencies Using Large Language Models
This paper presents LEREDD, a novel Large Language Model-based approach leveraging Retrieval-Augmented Generation and In-Context Learning to automatically detect diverse requirement dependencies from natural language, demonstrating superior accuracy and F1 scores compared to state-of-the-art baselines while releasing a new annotated dataset to support future research.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are the project manager for a massive, complex construction project, like building a futuristic city. You have thousands of blueprints (requirements) written in plain English. Some blueprints say, "Build a bridge," while others say, "Install a traffic light."
The problem? These blueprints aren't isolated. The traffic light depends on the bridge being built first. If you ignore these connections, the city might collapse, or you'll end up building the same thing twice.
In the software world, this is called Requirement Dependency Detection. It's the hard job of figuring out which software instructions rely on others. Traditionally, humans have to read thousands of documents and manually draw lines between them. It's slow, boring, and prone to mistakes because human language is messy and ambiguous.
This paper introduces a new tool called LEREDD (LLM-Enabled Requirement Dependency Detection). Think of LEREDD as a super-smart, tireless architectural assistant powered by a Large Language Model (like the AI behind ChatGPT), but with a special twist to make it perfect for this job.
Here is how LEREDD works, broken down into simple concepts:
1. The Problem: The "Zero-Shot" Mistake
The authors first tried asking a standard AI (like a raw GPT-4) to just look at two requirements and guess if they are connected. This is called "Zero-Shot" prompting.
- The Analogy: Imagine asking a brilliant but inexperienced intern to read two blueprints and guess how they connect without showing them any examples or the building's master plan.
- The Result: The intern was okay at spotting things that didn't connect (saying "These are totally different"), but they were terrible at spotting the subtle, specific connections. They would often guess wrong or miss the details.
2. The Solution: LEREDD's Two Superpowers
To fix this, the researchers gave the AI two special tools, turning it from a "guessing intern" into a "senior engineer."
Power A: The "Context Librarian" (RAG)
- What it is: Retrieval-Augmented Generation.
- The Analogy: Before the AI makes a decision, it opens a massive library (the full software document) and pulls out the specific pages that explain how the building's systems work.
- Why it helps: If the AI sees "The system shall stop the car" and "The system shall use the brakes," it might not know they are connected. But if the "Librarian" pulls up a page saying, "The braking system is called BCS," the AI suddenly understands: Ah! The first requirement needs the BCS, which is the second requirement. It gives the AI the background knowledge it needs to reason correctly.
Power B: The "Study Buddy" (In-Context Learning)
- What it is: Dynamic Examples.
- The Analogy: Before the AI analyzes a new pair of blueprints, the system finds 4 other pairs of blueprints that are very similar and shows the AI how an expert labeled them.
- Why it helps: It's like showing a student, "Here is how we solved a similar math problem yesterday." It helps the AI understand the style and logic of the specific task, rather than just guessing based on general knowledge.
3. The Workflow: How LEREDD Thinks
When LEREDD looks at two requirements, it doesn't just guess. It follows a strict process:
- Gather Intel: It grabs the relevant background info (Context) and similar past examples (Study Buddy).
- Reason: It reads the two requirements, looks at the intel, and asks, "Do these depend on each other? If so, how?"
- Explain: It doesn't just say "Yes." It writes a short note explaining why (e.g., "Requirement A needs the sensor mentioned in Requirement B").
- Confidence Check: It gives itself a score (0 to 5) on how sure it is.
4. The Results: Why It's a Game Changer
The researchers tested LEREDD against old-school methods (like simple keyword matching) and standard AI models.
- The "No Connection" Filter: LEREDD is incredibly good at spotting pairs that don't need to be connected. It correctly identified 96% of these "unrelated" pairs.
- Real-world impact: In a real project, 80% of requirement pairs are unrelated. LEREDD can instantly filter out the noise, saving humans hours of work so they can focus only on the tricky connections.
- The "Fine-Grained" Detective: For the hard-to-spot connections (like "Requires" or "Conflicts"), LEREDD was vastly superior. It improved accuracy by over 100% compared to the next best method.
- The "Traveling Expert": Usually, AI models trained on one project fail miserably on a new project. LEREDD, however, works great even when tested on a completely different system (like switching from a parking system to a traffic system) because it uses its "Librarian" and "Study Buddy" to adapt on the fly.
The Bottom Line
LEREDD is like giving your software team a super-intelligent assistant that never gets tired, reads the entire manual before answering, and learns from examples instantly.
It doesn't replace human engineers; instead, it acts as a powerful filter. It clears away the 80% of requirements that don't need attention and highlights the critical connections that humans need to review. This saves time, reduces errors, and helps build better, safer software systems.
In short: It turns the chaotic task of connecting thousands of software instructions into a manageable, automated process, letting humans focus on the big picture.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.