Evidence-Gated Generation (EGA v3): Replacing Blind Retries with Bounded Correction
EGA started as a verification layer.
Evidence-Gated Generation (EGA v3): Replacing Blind Retries with Bounded Correction
EGA started as a verification layer.
v1 checked generated answers against source. v2 made it stricter — claim-level verification and selective abstention.
So now we can reliably say what’s correct and what’s not.
But that creates a new problem.
What do you do with the parts that fail?
Most systems retry the entire answer. Not because it’s correct — but because there’s no better mechanism.
Even if one sentence is wrong, we regenerate everything. Sometimes it improves. Sometimes the same failure comes back.
And we don’t really know what changed between runs.
This leads to wasted compute, unstable outputs, and systems that are hard to reason about.
We can detect errors precisely — but we still fix them blindly.
EGA v3 is about closing that gap.
Retries sound simple. Just try again.
But retries don’t target the problem.
They regenerate the whole answer without isolating what failed. If one unit is wrong, everything gets recomputed.
And retries often repeat the same mistake. Same prompt. Same context. Slight variation.
So you end up in a loop: retry → re-evaluate → retry again
Sometimes it converges. Sometimes it doesn’t.
There’s no guarantee of improvement. No control over what changed. No way to fix a specific failure.
At that point, you’re not correcting the system — you’re just rolling the dice again.
The alternative is to stop treating the answer as one block.
Break it into units. Find exactly what failed. Only touch those.
That’s bounded correction.
Instead of retrying everything, we isolate failures and fix just those parts. Everything that passed stays untouched.
No full-answer retries. No cascading changes. Just targeted correction with a hard limit on attempts.
And every correction is verified again before it’s accepted.
So the system moves from: “maybe this run is better”
to: “this part was wrong, and this is the only thing we changed”
In v3, this becomes an explicit execution loop.
Generate once. Break into units. Verify each unit.
Anything that passes is locked. Anything that fails is sent for correction — not the whole answer.
Correction only sees failed units. It doesn’t rewrite everything. And it only gets one or two attempts.
After correction, units are verified again. If they pass, they’re included. If they still fail, they’re dropped.
That’s it.
No full retries. No hidden loops. No “let’s try again.”
Just: generate → verify → correct → verify → stop
This changes how the system behaves.
Outputs become stable. If something passes once, it stays.
Failures are contained. A bad unit doesn’t drag everything down.
Compute becomes predictable. You’re not rerunning full generations repeatedly.
And most importantly — the system becomes explainable.
You can trace: what failed → what changed → what passed
No mystery improvements. Just explicit decisions.
To make this usable, v3 moves away from pipeline code into a simple primitive.
The entry point is:
verify_answer(…)
You pass input, output, and config.
Under the hood, it runs: generate → decompose → verify → correct → stop
PipelineConfig controls behavior: unitization, verifier, correction limits, thresholds.
Defaults are strict: bounded correction, no full retries, always re-verify.
So instead of wiring steps together, you call one function.
That’s the shift: from a pipeline you assemble to a loop you invoke
The verifier is not hardcoded.
You can plug in: NLI models LLM judges Rules Domain-specific checks
As long as it returns pass/fail per unit, it works.
Because verification is not universal.
What works for summarization won’t work for clinical or extraction tasks.
v3 doesn’t solve verification. It standardizes what happens after.
verify → isolate → correct → stop
There’s one more piece: the trace.
Every step is recorded.
Units created Pass/fail decisions Corrections attempted What changed
Nothing is hidden.
So when something looks off, you don’t guess. You inspect.
Without this, correction loops become opaque.
With it, every decision is visible.
EGA v3 is a small shift, but it changes how you build LLM systems.
You stop retrying blindly. You control how things are fixed.
You stop treating answers as blocks. You operate at the unit level.
You stop hoping failures don’t repeat. You prevent them from spiraling.
It’s not about smarter models.
It’s about making behavior predictable.
In practice, this fits anywhere correctness matters but retries are expensive.
Summarization Extraction Agent outputs
Anywhere partial correctness beats blind regeneration.
v3 doesn’t make models perfect.
It makes systems reliable.
EGA v3 is available as a Python package.
verify_answer(…) runs the full loop. PipelineConfig controls behavior.
No manual orchestration. No retry logic to manage.
Repo (v3.0.0): https://github.com/bh3r1th/llm-evidence-gated-generation/releases/tag/v3.0.0
Disclaimer: The posts here represent my personal views, not those of my employer or any specific vendor. Any technical advice or instructions are based on my knowledge and experience.
메타데이터
- post_id
- 76d238d4f82e
- slug
- evidence-gated-generation-ega-v3-replacing-blind-retries-with-bounded-correction-76d238d4f82e
- url
- https://medium.com/@bh3r1th/evidence-gated-generation-ega-v3-replacing-blind-retries-with-bounded-correction-76d238d4f82e
- canonical_url
- https://medium.com/@bh3r1th/evidence-gated-generation-ega-v3-replacing-blind-retries-with-bounded-correction-76d238d4f82e
- author_url
- https://medium.com/@bh3r1th
- status
- ok
- fetched_at
- 2026-06-12 22:02:08