Bruno Coelho
ReliabilityTheme: Agents at work

The desired AI output lever: the "contract" & gates criteria between the stages, a concrete case

First published on LinkedIn, 7 Sep 2026Article, with its postRead it on LinkedIn

Overall. Eight stages, four Python scripts, 83 exam items in about four hours. The procedure, what each gate catches, what it costs, and what it does not fix.

The Agentic AI use case origin

Last month I needed to build a question bank for an exam with only a public Rubric and 3 sample questions. Zero questions bank available openly, raised the question. How could I build a reliable question bank?

Decided to use Agentic AI to target 83 across 7 domains and 38 objectives. 80 written by model sub-agents plus 3 official samples copied verbatim from the guide and never touched.

Approach in a brief from zero into repeatable workflow

Three judge models reviewed every item independently, then deliberated on the contested ones. Two rounds, zero answer-key changes, one systematic defect measured out. Make the approach into a re-usable workflow, an asset

The catch: Anyone can get one good output out of a model. The question is different: will the second run, done by someone else, six months from now, land in the same quality of questions? That is answered by the gate creteria and handovers, not by the agents alone producing the questions.

Stepped wise process in a brief

# · Stage · Runs as · Hands over

1 · Blueprint extraction · Coordinator, in-session · Domains, published weights, verbatim numbered objectives

2 · Grounded research · 1 agent per domain group, parallel · Evidence packs, every claim carrying an inline source URL

3 · Parallel authoring · 1 agent per domain group, parallel · Items written to a weighted per-objective quota, merged into bank v1

4 · Blind multi-model judging · 1 agent per judge, parallel, different model each · One verdict record per item per judge

5 · Agreement scoring · Coordinator, score_agreement.py · Pairwise agreement, consensus, key disputes, issue frequency, per-judge strictness

6 · Deliberation · 1 agent per judge, same models as stage 4 · Finished replacement text, focus on contested items only

7 · Editorial merge · 1 agent, strongest model · One fix file, applied to produce bank v2

8 · Measured verification · Coordinator plus remediation agents · Before and after defect measurement, bank v3

Stage 1 is never delegated: a sub-agent quietly paraphrasing an objective corrupts everything downstream. Stage 6 touches contested items only, because re-judging what the panel already agreed on costs three times the tokens for nothing.

Why a script sits between the stages instead of a handover of prose is the safest and fastest approach

Four Python scripts. validate_bank.py, score_agreement.py, measure_cues.py, apply_fixes.py. Standard library only, no pip install, ever, so there is nothing to install on a locked-down machine. Each takes file paths, prints a report, exits non-zero on failure, and runs in under a second.

They exist because a prose handover between two agents has no failure mode. An agent reads a summary, believes it, proceeds. Nothing in that exchange can say no.

A script can say no. It knows nothing about certification and cannot be talked round. Every agent here is told up front that the coordinator will measure the same thing independently. The report is the hypothesis. The script is the verdict.

What each gate actually catches

Gate 1, after blueprint extraction. Weights sum to 100. Objective ids contiguous. Objective text verbatim rather than paraphrased. It is four lines of Python and it protects every stage after it.

Gate 2, after research. Every objective must appear in a coverage map with an honest strength rating, and any objective with no live vendor source becomes declared residual risk on the spot.

Gate 3, after authoring. validate_bank.py catches structural defects. Bad keys, answer text that does not match the keyed option, missing select cues, tasks not on the blueprint. Every one is an author bug, so the report goes back to the author rather than being patched by hand. It also records the baseline that becomes the "before" column at stage 8: correct answer longest in 80 of 83 items, mean option ratio 1.90.Gate 4 does not exist, and that is a gap. Stage 4 is the parallel blind judging, and its output goes straight into stage 5 without being checked first. Each judge writes a verdict file, there is a schema for it, and nothing validates one against the other before the agreement maths runs. A judge that returned 78 verdicts instead of 83, or wrote a severity value the schema does not allow, would not stop anything. It would quietly shift every agreement percentage that follows. I found this while writing this piece rather than while building the thing, which is its own small lesson about where gaps hide. It is four lines of Python and it is on my list.

Gate 5, after round 1. Three judges over 83 items is 249 verdicts and 123 pooled findings. Reading them gives an impression. score_agreement.py gives numbers. Key disputes must be zero, and a disputed key goes to a human, never to a vote. Pairwise verdict agreement of 70 to 85% is healthy; above roughly 95% the judges are echoing each other. And the issue frequency showed what reading never would: distractor_quality was 52 of the 123 findings. One systematic defect, not scattered noise, which justified a dedicated remediation pass instead of item-by-item repair.

Gate 6, after deliberation. This gate exists because of what round 1 showed. Opus passed 67 of 83, Sonnet 82, Fable 62. score_agreement.py computes each judge's strictness against the panel and emits a calibration sentence that goes into stage 6 verbatim. The lenient judge was not replaced. It got its own flag count next to the panel's, with no instruction to agree, and revised 27 of its 28 round-1 KEEPs among the contested items, converging on Fable, the strictest of the three, matching it on 26 of 28. The soft judge moved toward the hard one, not toward the middle. Opus and Sonnet ended as the least aligned pair, at 12 of 28. Without gate 5 there is no number to hand over.

The gate also wants change-versus-no-change agreement high (96 to 100% here) while tolerating much lower exact action-label agreement (43 to 93%). Judges agree on what is broken and label the repair differently, which is why stage 7 merges text instead of counting votes.

Gate 7, after the merge. apply_fixes.py refuses any key change, refuses to touch a protected official item, and refuses two fix files competing for one id, because that is exactly the merge the editor was supposed to have done. It validates everything before writing, and if one assertion fails it writes nothing at all. Key drift came out at zero, and I re-checked that myself rather than taking the script's word.

Gate 8, measured verification, mandatory. This one exists because of a specific failure. The panel found the correct option was systematically the longest, so a candidate could beat the bank by picking the longest answer without reading the question. An editor agent rebalanced the options and reported ratios of 1.04 to 1.23. Balanced, done, in good faith. I measured the whole bank and the cue was still live on 86% of items.

The progression: 96% at the start, 86% after the edits reported as a success, 41% after a dedicated remediation pass. The measured chance baseline for this bank is 28%, not 25%. measure_cues.py computes it across the actual item mix, and the 17 multi-response items lift the blended figure, so read the baseline off the tool rather than assuming the textbook number. The gate passes at mean ratio 1.35 or below and key-is-longest 55% or below. The two remaining outliers are the official verbatim items, exempt by design.

Reproduction and Re-Usability: What it costs, so you can judge feasibility

From the reference run, 83 items and 3 judges:

- About 2.8M sub-agent tokens across 17 agent runs. Roughly 34k tokens per item.

- About four hours wall-clock with parallel fan-out. The judging rounds dominate.

- Coordinator work measured in minutes.Judge count is the main cost lever. Cost is roughly linear in items for authoring and in items multiplied by judges for review, and three judges is about 55% of total spend. Dropping to two is the obvious saving, and it costs you the divergence that made stage 5 informative.

Extensablility

Research is a fixed cost per domain group and it is reusable. Extending an existing bank against the same blueprint runs at roughly 60 to 70% of a first run's per-item cost, because stage 2 becomes a URL verification pass rather than fresh research. An extension of 40 items works out at about 0.9 to 1.1M tokens across about 11 agent runs.

Future work & what the method does not solve

Multi-vendor judging. All three judges came from one vendor. From inside that panel I cannot tell whether they miss the same things. Their agreement might mean the items are sound, or it might mean the three are correlated, and nothing in the artefacts separates those readings. The experiment that would settle it: run the same items through a judge from a different vendor on the same rubric, and see whether it raises a class of defect none of the three raised. I have not run it yet.

Undocumented domains cannot be grounded. One domain of 11 items had no citable vendor documentation at all and rests on the blueprint's own objective wording. Two judges flagged that as an evidential asymmetry no amount of content editing can close. The honest remedy is to declare the weakness, not to manufacture a citation.

Documentation updates. Four items were already stale against a guide published weeks earlier. A bank needs source content and location re-verification every exam cycle.

What was not done

The psychometrics are not validated. No candidate response data, so no difficulty and no discrimination indices. Cue measurement is a proxy for fairness. It is not statistics.

Call for action - Expert Review

Human sign-off is still required, and this is where you come in. Every item was authored and reviewed by models. No subject matter expert has signed off on the bank, and until one does, that limit stays stated plainly on the repository.

If you hold the Claude Certified Architect Professional credential, or you work in this material every day, go through the questions and the answers and tell me where they are wrong. github.com/bracoelho/ccar-p-exam-trainer.

Your takeaway

In your Agentic Workflow, pick one agent handover and write the script that checks it. Not a rubric, not an LLM judge. Something deterministic that counts, compares or asserts, exits non-zero, and stops the pipeline. Mine counts characters in option strings. 90 lines, and it caught the defect the strongest model in the pipeline had reported as fixed.

If you run any multi-agent review, compute each reviewer's strictness against the others and give each one its own number before the next round. The computation is arithmetic. The delivery is one sentence.

Budget by judges, not by items. When someone asks what a defensible review costs, the answer is mostly the panel. Know that number before you commit to volume.

One open question

So which handovers in your pipeline are genuinely unmeasurable, and which ones simply have not had a script written for them yet?

The post that shared this article · 7 Sep 2026

I share the whole method of an Agentic Workflow, reflections and takeways.

If you have to sign off on AI output and the people who have to build the thing that produces it, this is for you.

Link to the repo in the article

Read the post on LinkedIn