Principle:2akouwu Reverify Closed Verification Loop
| Knowledge Sources | |
|---|---|
| Domains | Reverse_Engineering, LLM_Agents, Iterative_Refinement |
| Last Updated | 2026-10-24 12:00 GMT |
Overview
Iterative propose-verify-revise loop where a language model proposes claims about a binary, deterministic tools judge each claim, and the model revises based on feedback until the information score crosses a grounding threshold or a round cap is reached.
Description
The Closed Verification Loop is the engine that makes tool-grounded verification iterative. A single round of propose-verify is fragile: the model may propose trivial or wrong claims on its first attempt. By closing the loop — feeding back refutations, observed values, and remaining unknowns — the model can revise and propose increasingly informative claims across rounds.
Each round:
- Build the prompt from the binary fact sheet, the ledger's established facts, known-false claims, and feedback from the previous round. The prompt is compacted (trimmed) to fit a character budget, but scoring always uses the full fact sheet so hiding a fact can never make restating it profitable.
- The model proposes claims as a JSON array of claim objects. Claims are parsed tolerantly (code fences, stray prose are handled).
- The verifier judges every claim with deterministic tools (see Principle:2akouwu_Reverify_Tool_Grounded_Verification).
- Anti-gaming filters detect echoes (parroting observed values), duplicates, trivial claims, and already-known facts (see Principle:2akouwu_Reverify_Information_Weighted_Scoring).
- Results are recorded in the durable ledger after each round.
- Feedback is generated for the next round: which claims were refuted, which observed values to build on.
The loop terminates when the information score reaches min_information (grounded) or max_rounds is hit. The ledger persists across rounds and across sessions, so a fresh context can resume from the established state.
Usage
Use this principle when:
- You want to reconstruct a binary's structure iteratively with an LLM, not in a single shot.
- You need the loop to be self-correcting: refutations guide the model away from wrong claims.
- You want the process to be resumable: a context reset should not lose verified progress.
- You need anti-gaming: the model should not score by restating known facts or echoing tool output.
Theoretical Basis
The loop is a bounded iterative refinement process:
# Abstract algorithm (NOT real implementation)
facts = binary_facts(data)
established = ledger.established()
known_false = ledger.known_false()
for round in 1..max_rounds:
view, compactions = compact_facts(facts, budget, established, feedback, known_false)
prompt = build_prompt(goal, view, established, feedback, known_false)
raw_claims = model.propose(prompt)
claims = parse_claims(raw_claims)
report = verifier.verify_all(claims, facts=facts) # score against FULL facts
apply_echo_detection(report, prev_round_observed)
ledger.record(report)
established = ledger.established()
known_false = ledger.known_false()
feedback = format_feedback(report)
if report.grounded:
break
Key invariants:
- Full-sheet scoring: The model may be shown a trimmed view (for prompt budget), but scoring always uses the complete fact sheet. A fact hidden from the view is still counted as trivial if restated.
- Monotonic ledger: The ledger only grows with verified facts; refuted claims are kept as known-false and never re-entered. This prevents the loop from cycling.
- Anti-gaming: Echo detection compares each claim's asserted value against values the tools observed in the previous round. A claim that copies an observed value gets weight zero.
- Bounded rounds: A max_rounds cap prevents infinite loops. The loop can also be bounded by a prompt character budget (prompt_budget) that triggers fact compaction.
Practical Guide
To set up a closed verification loop:
- Choose a proposer: Use
openai_proposerfor a real LLM, ordemo_proposerfor offline testing. - Configure the agent: Set
max_rounds(typically 3-5),min_information(grounding threshold),prompt_budget(character limit for the prompt). - Attach a ledger: Pass a directory path for durable persistence, or let it default to in-memory.
- Set resume=True to continue from an existing ledger, or False for a fresh start.
- Call
agent.run(goal)with a plain-language description of what to reconstruct. - Inspect the result: Check
grounded,information,rounds_used, and the per-round history.
Related Pages
Implemented By
- Implementation:2akouwu_Reverify_ReconstructionAgent
- Implementation:2akouwu_Reverify_binary_facts
- Implementation:2akouwu_Reverify_parse_claims
- Implementation:2akouwu_Reverify_Verifier
- Implementation:2akouwu_Reverify_Ledger
- Implementation:2akouwu_Reverify_model_loop_run
Uses Heuristic
Related Principles
- Principle:2akouwu_Reverify_Tool_Grounded_Verification — the tools that judge each round.
- Principle:2akouwu_Reverify_Information_Weighted_Scoring — the scoring that drives termination.
- Principle:2akouwu_Reverify_Durable_Ledger — the state that survives context resets between rounds and sessions.