← Self-Healing Multi-Agent Systems

Response Repair ROI Calculator

Every failed validation that triggers a re-ask costs you another full inference. Response Repair fixes structural errors — wrong types, malformed JSON, bad enum casing — deterministically, in microseconds, before validation ever runs. This calculator estimates how much that saves at your pipeline volume.

No model call — pure deterministic repairDefaults tuned to GPT-4 class pipelinesFormula is fully transparent

Your pipeline parameters

Adjust to match your actual or estimated volumes. Defaults are calibrated for a mid-size company running heavy AI data pipelines on GPT-4 class models.

500k

Total LLM calls per month across all agents and pipelines.

5.0¢

Average cost per single LLM response in US cents — for GPT-4o with 1,500 output tokens this is roughly 2–8¢.

3.0%

Percentage of model responses that currently fail schema, type, or structural validation.

70%

Of failing responses, what percentage currently trigger a full re-ask (another inference)?

65%

Estimated share of failures that are structural — wrong types, bad JSON syntax, wrong enum casing, missing defaults — and can be auto-corrected without a retry.

Formula: Monthly savings = requests × failure rate × healable % × re-ask rate × cost per request.

Response Repair runs before validation and fixes structural issues deterministically. It does not call the model again — repair is microseconds, not another inference.

Estimated monthly savings

Monthly inference cost saved

$341.25

6,825 re-asks eliminated

Annual savings

$4,095

At current volume and cost

Additional gains

Latency hours saved / month

5.7 h

Assuming 3s per avoided re-ask

Pass-rate gain

+1.36 pp

Percentage-point lift in requests passing validation

Failures auto-healed / month

9,750

of 15,000 total validation failures

Note on scope

This calculator covers direct inference cost from eliminated re-asks. It does not model downstream savings from fewer SLA violations, reduced human review, or token overhead inside re-ask prompts — all of which typically add 20–40% to the real total.

Enable Response Repair in Agent Settings →

What Response Repair actually does

Tier 1 — JSON shape fixes

Trims whitespace, removes trailing commas, fixes unquoted keys, normalizes smart quotes, and extracts the JSON body from markdown fences.

Tier 2 — Semantic normalization

Casts numeric strings to numbers, normalises boolean tokens, fills null or missing fields with configured defaults, and normalises enum casing.

Runs before validation

The repaired output hits your validators. If it passes, no re-ask needed. If it still fails, your normal block or re-ask logic fires — nothing is bypassed.

Configurable per-agent

Off by default. Set to Safe (Tier 1 only), Standard (Tier 1 + 2), or Custom to choose exactly which rules apply.

Auditable

Every repair is logged: which rule fired, which field was changed, before and after values. Check X-VG-Healed-Trace on the response header.

Conservative by design

Repair defaults are never injected into fields with existing values. Object and array defaults require explicit opt-in in the schema.

Enable Response RepairRead the full articleDocumentation