Papers
Topics
Authors
Recent
Search
2000 character limit reached

LEREDD: LLM-Enabled Requirement Dependency Detection

Updated 5 July 2026
  • LEREDD is an LLM-based framework that employs retrieval-augmented generation and in-context learning to automatically identify dependencies in natural-language requirements.
  • It outperforms traditional methods by integrating domain-specific context and balanced few-shot retrieval, achieving an accuracy of 0.93 and robust fine-grained classification.
  • LEREDD provides self-reported rationales and confidence scores, aiding expert review and significantly reducing manual inspection burden in complex software projects.

Searching arXiv for the LEREDD paper and closely related requirement dependency detection work. LEREDD, abbreviated from “LLM-Enabled REquirement Dependency Detection,” is an LLM-based approach for automated detection of requirement dependencies that leverages Retrieval-Augmented Generation (RAG) and In-Context Learning (ICL) to identify diverse dependency types directly from natural-language requirements (Darif et al., 25 Feb 2026). It was introduced to address a persistent requirements engineering problem: requirements are inherently interconnected through various types of dependencies, yet dependency detection is often overlooked or performed manually because modern software systems contain high volumes of complex, coupled, and ambiguous natural-language requirements (Darif et al., 25 Feb 2026). In empirical evaluation, LEREDD was reported to provide highly accurate classification of dependent and non-dependent requirements, achieving an accuracy of 0.93 and an F1 score of 0.84, while particularly improving detection of fine-grained dependency types (Darif et al., 25 Feb 2026).

1. Problem setting and motivation

Requirement dependency detection concerns identifying how one requirement relates to another and whether the satisfaction, implementation, refinement, incompatibility, or redundancy of one requirement bears directly on another (Darif et al., 25 Feb 2026). The underlying motivation is operational: such dependencies underpin critical decisions and influence a range of activities throughout software development, including impact analysis, consistency checking, release planning, and change management (Darif et al., 25 Feb 2026).

The difficulty of this task arises from several factors stated explicitly in the source description. Modern Software Requirements Specification documents can contain hundreds or thousands of natural-language statements; requirements are often coupled through shared components, trigger conditions, or behaviors; and the ambiguity of natural language, combined with constant change, makes exhaustive manual inspection both prohibitively time-consuming and error-prone (Darif et al., 25 Feb 2026). This produces a setting in which the number of possible requirement pairs is large, while the proportion of truly dependent pairs is comparatively small.

The paper situates LEREDD against three broad families of prior automatic approaches. Retrieval-based methods such as TF-IDF plus LSA treat each requirement as a fixed vector and flag pairs whose cosine similarity exceeds a threshold, but they are described as brittle, lexically driven, and limited in supporting fine-grained dependency types (Darif et al., 25 Feb 2026). Knowledge-based methods rely on ontologies or graphs and can deliver high precision when the ontology is well crafted, but ontology construction and maintenance are laborious (Darif et al., 25 Feb 2026). Traditional ML methods such as Bi-LSTM or fine-tuned Transformer models learn from annotated pairs, yet the severe “no-dependency vs. dependency” class imbalance makes this setting difficult for standard learners (Darif et al., 25 Feb 2026).

Within this landscape, LEREDD is presented as a lightweight framework that exploits LLM strengths in natural-language understanding, reasoning, and generation, while avoiding hand-crafted ontologies and massive supervised datasets (Darif et al., 25 Feb 2026). A plausible implication is that its methodological contribution is not merely substituting an LLM for a classifier, but structuring the prompt so that task-specific examples and domain-specific context are both available at inference time.

2. Architectural design

LEREDD comprises two main phases: knowledge retrieval and dependency inference (Darif et al., 25 Feb 2026). The architecture is centered on a single GPT-4.1 prompt whose contents are assembled dynamically for each candidate pair of requirements.

In the knowledge retrieval phase, LEREDD applies contextual retrieval via RAG. The entire Software Requirements Specification document is split into overlapping text chunks, exemplified in the paper by 500 characters each with 200 characters of overlap (Darif et al., 25 Feb 2026). For a requirement pair (R1,R2)(R_1, R_2), the concatenated text of the two requirements serves as a retrieval query against the chunk store. Each chunk is encoded by a pre-trained embedding model, and the system selects the top kk most semantically similar chunks, with k=10k=10 in the reported experiments, to provide domain context such as subsystem names, component descriptions, and architectural notes (Darif et al., 25 Feb 2026).

The second retrieval component is dynamic example retrieval for ICL. LEREDD maintains a small annotated corpus of requirement pairs labeled with one of the supported dependency types or “No_dependency” (Darif et al., 25 Feb 2026). For each target pair and for each dependency type tt, the system retrieves the most similar labeled examples of type tt so that the prompt contains demonstrations spanning all classes rather than only the most likely one. This design is important because the target task is multiclass and includes rare dependency types.

The dependency inference phase is executed by GPT-4.1 using a prompt with three sections: contextual scope, inputs, and instructions (Darif et al., 25 Feb 2026). The contextual scope positions the model as an expert requirements engineer in a specific domain. The input section contains Requirement A, Requirement B, formal definitions of the dependency types, retrieved examples, and the top 10 RAG chunks. The instruction section directs the model to decide which type applies or output No_dependency, and to provide both a rationale and a confidence score from 0 to 5 (Darif et al., 25 Feb 2026). The response is constrained to the schema:

tt2

By combining RAG and ICL inside one prompt, LEREDD explicitly couples domain grounding with exemplar-based task conditioning (Darif et al., 25 Feb 2026). This suggests that the method is designed to reduce hallucinated or weakly grounded judgments while preserving the few-shot adaptability characteristic of LLM prompting.

3. Retrieval and prompting methodology

The similarity computation used for example retrieval is one of the most specific technical elements of LEREDD. All four sentence-level embeddings {R1,R2,Ra,Rb}\{R_1, R_2, R_a, R_b\} are obtained from SBERT, after which Euclidean similarities sim(,)\operatorname{sim}(\cdot,\cdot) are computed between each target requirement and each example requirement (Darif et al., 25 Feb 2026). These four scores are aggregated by the formula:

Scoremaxavg(R1,R2;Ra,Rb)=max(sim(R1,Ra),sim(R1,Rb))+max(sim(R2,Ra),sim(R2,Rb))2\mathrm{Score}_{\max-\mathrm{avg}}(R_1,R_2;R_a,R_b) = \frac{ \max(\operatorname{sim}(R_1,R_a), \operatorname{sim}(R_1,R_b)) + \max(\operatorname{sim}(R_2,R_a), \operatorname{sim}(R_2,R_b)) }{2}

For each type tt, LEREDD picks the top 4 examples by Scoremaxavg\mathrm{Score}_{\max-\mathrm{avg}}, and these four examples per type, across all dependency types and the no-dependency case, are inserted as demonstrations in the prompt (Darif et al., 25 Feb 2026). This per-type balancing is a notable design decision because it ensures representation of rare classes in the demonstration set rather than allowing frequent classes to dominate by nearest-neighbor retrieval alone.

The prompt also includes formal definitions of the supported dependency types, not only examples. This matters because some distinctions are semantically close. For instance, “Conflicts” and “Contradicts” both encode incompatibility, while “Details,” “Is similar,” and “Is a variant” all involve forms of semantic overlap (Darif et al., 25 Feb 2026). LEREDD therefore combines definitional supervision and exemplar supervision within a single inference call.

Prompt tuning experiments reported in the source indicate that SBERT combined with Euclidean similarity and the max_avg aggregation formula, with kk0 demonstrations per type, gave the best few-shot results (Darif et al., 25 Feb 2026). Adding RAG with ten 500-character chunks further improved performance (Darif et al., 25 Feb 2026). Since these settings emerged from a sweep over embedding model, similarity metric, aggregation formula, number of examples, chunk size, and number of chunks, the paper frames LEREDD not as a single prompt template but as a tuned prompting strategy.

4. Dependency taxonomy and formalization

LEREDD handles seven direct dependency types, drawn from a state-of-the-art taxonomy, plus the No_dependency class (Darif et al., 25 Feb 2026). The definitions are as follows.

Type Definition
Requires If the fulfillment of one requirement is a prerequisite to the fulfillment of the other
Implements If one requirement is at a higher level and is fulfilled by the other, lower-level requirement
Conflicts If the fulfillment of one requirement restricts the fulfillment of the other
Contradicts If the two requirements are mutually exclusive—satisfying one violates the other
Details If both requirements describe the same action under the same condition, and one provides additional detail of that action
Is similar If one requirement replicates part or all of the content of another, resulting in redundancy
Is a variant If one requirement serves as an alternative formulation to the other

The paper also provides an intuitive logical reading for selected relations. Each requirement may be viewed as a predicate kk1 over system states (Darif et al., 25 Feb 2026). A Requires relation kk2 holds if kk3 state kk4, kk5 (Darif et al., 25 Feb 2026). Conflicts is characterized by kk6 such that kk7 (Darif et al., 25 Feb 2026). The paper states that it does not supply a full logical calculus, and these definitions are therefore intended to disambiguate types in the prompt rather than define a complete formal semantics.

This taxonomy is important because LEREDD is not restricted to binary dependency detection. It targets fine-grained direct dependency types directly from natural-language specifications (Darif et al., 25 Feb 2026). A plausible implication is that this distinguishes it from similarity-threshold methods, which may identify related pairs without reliably classifying the semantic nature of that relation.

5. Evaluation protocol, dataset, and metrics

The evaluation uses standard classification metrics. With kk8, kk9, k=10k=100, and k=10k=101 denoting true positives, false positives, false negatives, and true negatives, the paper reports:

k=10k=102

k=10k=103

k=10k=104

k=10k=105

For the multiclass setting, macro-averaged Precision, Recall, and k=10k=106 are reported so that rare dependency types contribute equally; for the binary dependent-versus-non-dependent setting, the paper also reports the usual accuracy and k=10k=107 (Darif et al., 25 Feb 2026).

The annotated dataset comprises three real automotive Software Requirements Specification documents: Adaptive Driving Beam (ADB), Traffic Jam Assist (TJA), and Automated Parking Assist (APA), containing 40, 25, and 50 requirements respectively (Darif et al., 25 Feb 2026). From each document, all unique pairs were generated, ranked by semantic similarity, and annotated by two experts until new dependent cases fell below a threshold (Darif et al., 25 Feb 2026). The resulting corpus contains 413 pairs for ADB, 200 for TJA, and 200 for APA, giving a total of 813 manually labeled pairs across all seven dependency types plus No_dependency (Darif et al., 25 Feb 2026). Inter-annotator Cohen’s k=10k=108 was 0.43, described as moderate agreement (Darif et al., 25 Feb 2026).

The empirical study is organized around four research questions. First, a zero-shot baseline compares four LLMs—GPT-4.1, Llama 3.1, Gemma 20B, and Mistral 7B—under a prompt with no examples and no context (Darif et al., 25 Feb 2026). Second, prompting strategy tuning explores embedding model, similarity metric, aggregation formula, number of demonstrations, chunk size, and chunk count (Darif et al., 25 Feb 2026). Third, intra-dataset evaluation holds out 20% of each dataset and compares LEREDD against TF-IDF+LSA and a fine-tuned BERT classifier (Darif et al., 25 Feb 2026). Fourth, cross-dataset evaluation tests transfer to a new system using demonstrations or training data from a different dataset (Darif et al., 25 Feb 2026).

6. Reported empirical performance

The reported results place LEREDD well above the tested baselines on both binary and multiclass variants of the task (Darif et al., 25 Feb 2026). In the overall binary classification of dependent versus non-dependent pairs, LEREDD achieves an accuracy of 0.93 and an F1 score of 0.84, with the latter averaging 0.96 for non-dependent cases (Darif et al., 25 Feb 2026). The emphasis on the No_dependency class is operationally significant because most requirement pairs are non-dependent, and effective filtering reduces the burden on human analysts.

In zero-shot evaluation, GPT-4.1 was the strongest among the four tested LLMs, but its macro k=10k=109 was still only 0.39 overall, with about 0.87 tt0 on the dominant No_dependency class (Darif et al., 25 Feb 2026). Fine-grained types performed much worse, which motivated the combined few-shot and RAG design. After prompt tuning, the configuration SBERT+Euclidean+max_avg with tt1 demonstrations per type increased overall tt2 from 0.39 zero-shot to 0.73 few-shot on average, and adding RAG with ten 500-character chunks improved average tt3 further to 0.78 (Darif et al., 25 Feb 2026). For the “Requires” class, performance rose from 0.52 zero-shot to 0.70 with few-shot+RAG, described as a relative gain of 35% (Darif et al., 25 Feb 2026).

The intra-dataset comparison reports the following macro-tt4 values (Darif et al., 25 Feb 2026):

Dataset TF-IDF & LSA BERT LEREDD
ADB 0.56 0.59 0.92
TJA 0.72 0.34 0.76
APA 0.62 0.63 0.85

The corresponding relative gains over the best baseline are reported as +55.9% for ADB, +5.6% for TJA, and +34.9% for APA (Darif et al., 25 Feb 2026). On the No_dependency majority class, LEREDD averaged tt5 versus 0.87 for TF-IDF and 0.70 for BERT (Darif et al., 25 Feb 2026). On the “Requires” class, it averaged 0.76 versus 0.39 and 0.46, which the paper describes as a relative gain near +95% (Darif et al., 25 Feb 2026). The abstract additionally states average relative gains of 94.87% and 105.41% in F1 scores for the Requires dependency over the baselines (Darif et al., 25 Feb 2026).

The cross-dataset comparison is intended to simulate deployment on a new system with only historical labels. In this setting, TF-IDF+LSA is unchanged by training, BERT drops to approximately tt6 on “Requires,” while LEREDD’s overall tt7 declines only from 0.78 in-dataset to 0.76 cross-dataset, and its No_dependency tt8 remains above 0.95 (Darif et al., 25 Feb 2026). This suggests relative robustness to distribution shift across systems within the automotive domain.

7. Significance, limitations, and future directions

The paper identifies several strengths of LEREDD. It harnesses LLM reasoning rather than pure vector similarity, few-shot example-driven learning plus selective RAG context consistently outperforms both traditional NLP and fine-tuned ML even under distribution shifts, and the self-reported rationale and confidence add transparency and allow human reviewers to triage low-confidence cases (Darif et al., 25 Feb 2026). It also states that by filtering out No_dependency pairs with 0.95+ tt9, the method shrinks the manual workload dramatically (Darif et al., 25 Feb 2026). Since the response schema explicitly includes a rationale and confidence score, LEREDD is designed not only as a classifier but also as a decision-support mechanism for expert review.

The principal limitations are also stated directly. The gold standard covers only three automotive systems, so generalization to other domains awaits further study (Darif et al., 25 Feb 2026). Manual annotation is inherently subjective, and Cohen’s tt0 indicates only moderate agreement, although the paper notes that two experts and consensus-driven resolution mitigate bias (Darif et al., 25 Feb 2026). LLM responses can vary, but the study sets temperature to 0 so that outputs are effectively deterministic (Darif et al., 25 Feb 2026). Cost and runtime are higher than for lightweight baselines: in intra-dataset tests, LEREDD took approximately 110 s on average versus approximately 2 s for TF-IDF and approximately 240 s for BERT, which the authors characterize as a reasonable engineering trade-off for the accuracy gain (Darif et al., 25 Feb 2026).

The stated contributions are fourfold: LEREDD itself as a novel RAG+ICL framework built on LLMs to detect seven fine-grained requirement dependency types from natural language; a publicly released corpus of 813 annotated requirement pairs across three real automotive systems; a large empirical study comparing LEREDD to classical retrieval, ontology-style, and fine-tuned ML baselines in intra- and cross-dataset settings; and a detailed analysis of prompting strategies for future requirements engineering applications of LLMs (Darif et al., 25 Feb 2026). Future directions include extending the framework to indirect or chain dependency paths such as tt1, integrating predicted dependencies into impact analysis tools for requirement evolution, applying the method in domains such as healthcare and avionics, and exploring ensemble strategies or smaller open-source LLMs to reduce cost while maintaining accuracy (Darif et al., 25 Feb 2026).

Taken together, LEREDD occupies a specific position in requirements engineering research: it is an LLM-centered framework for dependency detection that combines retrieval of domain context with retrieval of labeled exemplars, targets multiclass dependency typing rather than only pairwise relatedness, and is evaluated on a manually annotated automotive corpus with strong reported gains over zero-shot prompting, retrieval baselines, and fine-tuned BERT models (Darif et al., 25 Feb 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to LEREDD.