Beyond Accuracy: Disentangling Decomposition from Typed-State Quality Assurance in Multi-Agent LLM Pipelines
Organizations: Centro de Informática, Universidade Federal de Pernambuco (UFPE), Recife, PE, Brazil
Abstract
Multi-agent LLM pipelines are often credited with gains in software engineering tasks, but it is rarely clear whether a gain stems from the typed contract between agents or from the specialized prompts that decomposition enables. We study this attribution problem in Requirements Engineering, comparing three architectures for classifying requirements as functional or non-functional and then prioritizing them with MoSCoW: a single-call baseline; a two-call variant that reuses the pipeline's specialized prompts but passes an unvalidated intermediate; and a pipeline with a Pydantic-validated typed state. The 18 conditions cover PROMISE NFR+ (625 requirements), three locally hosted small language models, and two languages. The F1 gain over the baseline is associated with the two-call, specialized-prompt variant (up to +0.075), whereas the typed state adds a small difference (-0.003 to +0.013) that is significant in one of six comparisons. Beyond accuracy, the typed pipeline contains out-of-range model outputs at the agent boundary, while the unvalidated variant fails later and drops the requirement, and it shows a small, reproducible increase in inter-model MoSCoW consistency whose cause our design cannot isolate. The study is associative: the contrasts bundle prompts, call count, and staged context, and the results come from three 7--8B models on one dataset. The implementation and replication package are archived on Zenodo (https://doi.org/10.5281/zenodo.23380444).
Figures & tables
| Property | Baseline | Two-call | Pipeline |
|---|---|---|---|
| LLM calls per requirement | 1 | 2 | 2 |
| Prompts | joint | task-specific | task-specific (same as two-call) |
| Intermediate result | none | plain dataclass | validated Pydantic object |
| First Pydantic validation | after the single call | after the second call | after the first call (agent boundary) |
| Confidence given to the prioritiser | — | fixed at 1.0 | passed; below 0.70 the prompt asks for conservative labels |
| Orchestration | direct agent call | direct agent call | LangGraph StateGraph |
| Model | Params | Quant. |
|---|---|---|
| qwen2.5:7b | 7.6B | Q4_K_M |
| llama3.1:8b | 8.0B | Q4_K_M |
| mistral:7b | 7.2B | Q4_K_M |
| Factor | Levels |
|---|---|
| Architecture | baseline, pipeline, two-call baseline |
| Model | qwen2.5:7b, llama3.1:8b, mistral:7b |
| Language | EN (original), PT (machine-translated) |
| Baseline | Pipeline | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Model | L | Acc | F1 | MCC | Acc | F1 | MCC | F1 | Sig. | ||||
| qwen2.5:7b | PT | 0.733 | 0.733 | 0.527 | 0.814 | 0.812 | 0.638 | +0.079 | +0.193 | +0.253 | ✓ | ||
| qwen2.5:7b | EN | 0.784 | 0.784 | 0.613 | 0.808 | 0.807 | 0.639 | +0.023 | +0.060 | 0.059 | 0.077 | +0.119 † | – |
| llama3.1:8b | PT | 0.640 | 0.630 | 0.446 | 0.696 | 0.693 | 0.511 | +0.063 | +0.119 | +0.287 | ✓ | ||
| llama3.1:8b | EN | 0.728 | 0.724 | 0.557 | 0.730 | 0.728 | 0.556 | +0.004 | 0.011 | 0.680 | 0.0073 | +0.154 † | |
| mistral:7b | PT | 0.602 | 0.586 | 0.380 | 0.579 | 0.560 | 0.345 | 0.026 | 0.046 | 0.071 | 0.092 | 0.117 † | – |
| Pipeline Baseline | (2-call Base) | (Pipe 2-call) | |||||
|---|---|---|---|---|---|---|---|
| Model | L | [adj. interval] | [adj. interval] | [adj. interval] | |||
| qwen2.5:7b | PT | +0.079 [+0.042, +0.119] | 621 | +0.076 [+0.034, +0.115] | 623 | +0.005 [ 0.011, +0.020] | 621 |
| qwen2.5:7b | EN | +0.023 [ 0.009, +0.057] | 623 | +0.020 [ 0.013, +0.054] | 623 | +0.003 [ 0.005, +0.013] | 623 |
| llama3.1:8b | PT | +0.063 [+0.028, +0.100] | 623 | +0.053 [+0.018, +0.087] | 623 | +0.011 [ 0.003, +0.026] | 623 |
| llama3.1:8b | EN | 0.005 [ 0.041, +0.028] | 590 | 0.003 [ 0.036, +0.029] | 590 | 0.002 [ 0.013, +0.010] | 623 |
| mistral:7b | PT | 0.027 [ 0.066, +0.011] | 623 | 0.024 [ 0.062, +0.015] | 623 | 0.003 [ 0.014, +0.006] | 623 |
| Arch. | Model | PT | EN | |||
|---|---|---|---|---|---|---|
| Baseline | qwen2.5:7b | 0.734 | 0.785 | 0.120 | 0.034 | |
| Baseline | llama3.1:8b | 0.640 | 0.729 | 0.191 | 0.0009 | |
| Baseline | mistral:7b | 0.602 | 0.607 | 0.010 | 0.862 | 0.801 |
| Pipeline | qwen2.5:7b | 0.815 | 0.809 | +0.015 | 0.793 | 0.913 |
| Pipeline | llama3.1:8b | 0.697 | 0.730 | 0.075 | 0.188 | 0.011 |
| Pipeline | mistral:7b | 0.579 | 0.638 | 0.121 | 0.034 |
| Architecture | L | Interp. | ||
|---|---|---|---|---|
| Baseline | PT | 623 | 0.1406 | poor |
| Baseline | EN | 623 | 0.1220 | poor |
| Two-call | PT | 623 | +0.1360 | slight |
| Two-call | EN | 623 | +0.1695 | slight |
| Pipeline | PT | 623 | +0.1768 | slight |
| Pipeline | EN | 623 | +0.2388 | fair |
| Contrast | What changes | What it supports |
|---|---|---|
| : baseline two-call | calls, task prompts, staged context | F1 associated with the variant (not which element) |
| : two-call pipeline | validation boundary, confidence, LangGraph | bound on the F1 difference; QA properties (not their cause) |
| Excluded | Retained | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Model | L | Base | 2Call | Pipe | ||||||
| qwen2.5:7b | PT | 0.733 | 0.808 | 0.812 | +0.075 | +0.004 | +0.075 | +0.001 | 8/7 | +0.033 † |
| qwen2.5:7b | EN | 0.784 | 0.804 | 0.807 | +0.020 | +0.003 | +0.020 | +0.003 | 3/1 | +0.250 † |
| llama3.1:8b | PT | 0.630 | 0.682 | 0.693 | +0.053 | +0.011 | +0.053 | +0.011 | 8/2 | +0.300 † |
| llama3.1:8b | EN | 0.724 | 0.730 | 0.728 | +0.006 | 0.002 | +0.045 | 0.002 | 3/4 | 0.071 † |
| mistral:7b | PT | 0.586 | 0.563 | 0.560 | 0.023 | 0.003 | 0.023 | 0.003 | 1/3 | 0.250 † |
| Architecture | Value-range (6) | Parse-level (7) |
|---|---|---|
| Baseline | flagged, 1 call | flagged, 1 call |
| Two-call | dropped, 6 calls | flagged, 2 calls |
| Pipeline | flagged, 2 calls | flagged, 2 calls |
Multi-Agent LLM Systems
Multi-agent large language model systems coordinate multiple AI agents to solve tasks through communication, specialization, shared tools, and memory.
See all 1,050 papers