Skip to content

About

Judge-first framework where LLM outputs must converge under explicit, adversarial oracles.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

RalphTheArbiter

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.

What Problem Does RalphTheArbiter Solve?

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

Intended Audience

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

Core Architecture

RalphTheArbiter operates as a convergence loop:

  1. A generator (LLM, human, or template) proposes a candidate
  2. Independent oracles evaluate the candidate
  3. Ralph aggregates oracle verdicts
  4. The candidate is accepted, rejected, or revised
  5. The loop repeats until convergence or failure

Importantly:

  • Oracles never call LLMs
  • LLMs never judge correctness
  • Ralph owns the final decision

What RalphTheArbiter Is Not

  • 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.

Why Failure and Delay Are Features

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.

What to Expect When You Run It

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.

Example Use Case: Verified Code Translation

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.

Repository Layout

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 oracles

    • behavior.sh — behavioral equivalence (authoritative)
    • structure.sh — structural and idiomatic constraints
    • negative.sh — forbidden constructs
  • src_A/ — reference implementation (source language)

  • src_B/ — candidate implementation (target language)

Artifacts and iteration logs may be generated during execution.

Quick Start

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.

About

Judge-first framework where LLM outputs must converge under explicit, adversarial oracles.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages