Named after Ralph Wiggum from The Simpsons: well-meaning, literal, and incapable of being convinced by confidence alone.
RalphTheArbiter is a judge-first framework where AI-generated candidates are never trusted by default.
RalphTheArbiter treats correctness as an external constraint, not a property of intelligence.
LLMs may propose solutions, but correctness is enforced by explicit, independent oracles. A candidate is accepted only when all oracles agree.
LLMs propose. Oracles constrain. Ralph decides.
Most AI systems treat model output as authoritative. RalphTheArbiter inverts this relationship.
In this framework:
- AI outputs are considered fallible
- Verification is explicit and adversarial
- Convergence is mechanical, not hopeful
RalphTheArbiter is designed for situations where:
- behavior must be preserved
- constraints must be enforced
- AI assistance must operate under law
This project is intended for:
- engineers interested in controlling AI outputs with explicit law
- verification-driven workflows
- systems that must fail loudly rather than succeed silently
This project is not intended for:
- fast demos
- prompt-engineering experiments
- autonomous agents optimized for success rate
RalphTheArbiter operates as a convergence loop:
- A generator (LLM, human, or template) proposes a candidate
- Independent oracles evaluate the candidate
- Ralph aggregates oracle verdicts
- The candidate is accepted, rejected, or revised
- The loop repeats until convergence or failure
Importantly:
- Oracles never call LLMs
- LLMs never judge correctness
- Ralph owns the final decision
- Not a chatbot
- Not a prompt playground
- Not an autonomous agent
- Not a one-shot code generator
RalphTheArbiter is a control system for AI-generated artifacts.
RalphTheArbiter is intentionally not optimized for speed or early success.
Repeated failures, stagnation detection, and long convergence sequences are signals that the system is enforcing external constraints instead of trusting model intent.
If a candidate converges in one or two iterations, it is treated with suspicion. Correctness must survive adversarial pressure, not just pass once.
A typical run involves:
- immediate rejection of the first candidate
- repeated failures and stagnation detection
- long convergence sequences
- occasional total failure to converge
This behavior is intentional. RalphTheArbiter prioritizes correctness under constraint, not success rate.
The generator proposes a candidate implementation. Behavioral oracles verify correctness. Structural oracles enforce invariants. Only behavior-preserving translations are accepted.
Translation is an application — not the core idea.
The repository is structured to separate generation, judgment, and policy:
-
RalphTheArbiter.py— authoritative entrypoint and convergence loop -
arbiter.py— core arbitration logic -
oracle.py— oracle wrappers -
AGENT_EQUIV.md— equivalence oracle specification (behavioral law) -
AGENT_GUARDIAN.md— target-language policy specification -
oracles/— executable oraclesbehavior.sh— behavioral equivalence (authoritative)structure.sh— structural and idiomatic constraintsnegative.sh— forbidden constructs
-
src_A/— reference implementation (source language) -
src_B/— candidate implementation (target language)
Artifacts and iteration logs may be generated during execution.
Requirements:
- Python 3.10+
- Ollama with a local model installed
- POSIX shell
Run:
python RalphTheArbiter.py
Observe the system rejecting candidates, detecting stagnation, and converging only when all oracles agree.
---
> RalphTheArbiter does not try to be smart.
> It tries to be correct.