VReAct: Verification as an Architectural Layer for LLM Agents: A V-Model Design, and a Pilot Study of Its Deterministic Core
Organizations: Independent Researcher Canada · Michigan Technological University Houghton, USA
Abstract
Large language model (LLM) agents built on the ReAct pattern concentrate four responsibilities in one model: selecting a strategy, choosing each action, formatting it, and judging whether the result is adequate. Nothing outside the generative loop can reject its output, so an agent that cannot progress does not report failure; it runs until an external budget terminates it. We propose VReAct, which treats verification as an architectural layer for ReAct agents by adapting the software-engineering V-model: specification levels descend from requirements to individual steps, each paired with a dedicated verifier; a deterministic controller enforces every verdict; and only verification outcomes write memory. A rejection thus localizes the level that introduced the fault, and an agent halts by declining rather than by exhaustion. Each verifier separates a zero-cost deterministic gate from an optional LLM judge, so the contribution and cost of each can be measured independently. A pilot study implements the acceptance- and unit-level verifier pairs, comparing five configurations that share one executor, tool set, and scorer and differ only in verification components, on the four-hop stratum of MuSiQue with an 8B-parameter backbone. Across 47 executions, the two unverified configurations answered none of ten questions, every run ending at a step cap or provider token limit; the verified configuration without a planner answered eight of ten and abstained on the rest. Deterministic gates produced eight of nine observed corrections at zero marginal cost, and planning degraded performance once verification was present. These results characterize termination behavior, not accuracy at scale; we outline a twelve-month plan to complete and evaluate the full architecture, including the integration-level pair the pilot omits.
Figures & tables
| What the literature does | The gap | Our fix | |
|---|---|---|---|
| G1 | The model that produced the output also checks it ( 11 , 12 ) . | No agent has a checker outside the loop whose verdict it must obey. Self-checking without external feedback degrades accuracy ( 14 , 15 ) . | Verifiers are separate components. The controller enforces their verdicts, so the agent cannot proceed past a rejection. |
| G2 | External checks exist, but for one artifact type: a reasoning step ( 16 ) , a program ( 17 ) . | None pairs checks to the levels of a specification, so a rejection cannot say which stage broke, and recovery means starting over. | One verifier per level. A rejection names the level that failed, and only that level is redone. |
| G3 | Systems mix free structural checks with LLM judgement and report the combined effect. | Nobody has measured what each half contributes, so the layer cannot be priced. | Gates and judges are separate stages, and every correction is attributed to one of them. |
| G4 | Context is trimmed to fit a budget ( 7 , 8 ) . | Nothing decides what deserves to be carried forward: verified and failed work are resubmitted alike. | Only verdicts write memory. Accepted results go to a ledger, rejections to an index keyed by component and cause. |
| Role | Reads | Never reads |
|---|---|---|
| Planner (L2) | L1; inventory of tools and components | any execution output |
| Designer (L3) | L2; this component’s slot and contract | sibling implementations |
| Executor (one subtask) | its objective; the contract it must honor; its checks; its own failure entries | L1, L2, sibling code, every earlier transcript |
| Gates | the artifact and the one condition | everything else |
| Judges R1–R3 | the artifact and its paired specification level | every other level, and all transcripts |
| Controller | the whole state | — |
| Config. | Composition | Plan | Guards | Gates | Judges |
|---|---|---|---|---|---|
| N (A) | plain ReAct | – | – | – | – |
| NP (B) | ReAct + planner | yes | – | – | – |
| VG (C1) | verified, no planner | – | yes | yes | – |
| VPG (C0) | + planner + plan gates | yes | yes | yes | – |
| VPGJ (C) | + LLM judges | yes | yes | yes | yes |
| Config. | exec. | score. | crash | corr. | abst. | cov. |
|---|---|---|---|---|---|---|
| N (plain ReAct) | 10 | 0 5 | 5 | 0 | 5 | 0.00 |
| NP (+ planner) | 10 | 0 5 | 5 | 0 | 5 | 0.00 |
| VG (verified) | 10 | 10 | 0 | 8 | 2 | 0.80 |
| VPG (+ planner) | 10 | 10 | 0 | 1 | 9 | 0.10 |
| VPGJ (+ judges) | 0 7 | 0 7 | 0 | 4 | 3 | 0.57 |
| Total | 47 | 37 | 10 | 13 | 24 | — |
| Config. | LLM calls | exec. steps | prompt tok. | compl. tok. |
|---|---|---|---|---|
| N | 12.0 | 12.0 (all at cap) | 18,891 | 1, 598 |
| NP | 13.0 | 12.0 (all at cap) | 11,180 | 1, 752 |
| VG | 11.8 | 11.8 (3–21) | 19,511 | 1,150 |
| VPG | 15.2 | 14.2 (8–20) | 17,226 | 1, 840 |
| VPGJ | 14.8 | 10.0 (4–18) | 20,943 | 1,210 |
| judge disabled | 23.0 | 20.0 | 28,609 | 1,464 |
| Source | rejections | corrections | rate | marginal cost |
|---|---|---|---|---|
| Deterministic gates | 24 | 8 | 0.33 | none |
| LLM judges | 0 3 | 0 1 | 0.33 | one call each |
| Months | Work and rationale |
|---|---|
| 1–2 | Consolidation, and the confound. One codebase with the configuration as a parameter, removing the divergence risk of § 7 ; a dense retriever ( 27 ) to raise the 67% ceiling. First ablation : guards without gates, gates without guards, and both ends of the ladder—until those cells exist, the difference in § 5 cannot be assigned to verification rather than loop control. |
| 3–4 | Scale, and verifier configurations. Roughly 500 items stratified by hop count, three seeds, three to five model tiers, every repeat retained; paired per-item analysis with effect sizes ( 38 ) , hypotheses registered beforehand. Asymmetric and ground-truth-constrained verification (§ 6.4 ) as separate conditions. Second ablation : full accumulation vs. ledger only vs. both stores, with tokens read per step reported alongside accuracy. |
| 5–7 | Transfer to code. Port to SWE-bench ( 32 ) and its agent interfaces ( 33 ) , with function-level suites under rigorous test augmentation ( 34 , 35 ) as a cheaper inner loop. In code the gate layer becomes a compiler, type checker, and test runner, with ground truth no question-answering gate can have; we expect the gate/judge balance to shift and will re-run Table 6 . |
| 8–10 | Debugging, and the integration layer. Fault localization and repair, where a failing test supplies both trigger and oracle ( 17 ) . The L2/R2 pair becomes testable at last: individually correct units forming a broken assembly is a real repository failure class invisible to unit checks (§ 3.5 ). Repository length makes the memory schema consequential, so its ablation is repeated with per-component isolation on and off. |
| 11–12 | Synthesis. Cross-domain comparison of where each half contributes, a replication package of code, prompts, items, seeds and logs, and submission. |
LLM Agent Verification
LLM agent verification checks whether agents’ actions, evidence, policies, and completion claims satisfy explicit requirements.
See all 131 papers