Skip to content

evals: archive mission traces + offline trace-diff scorer (Dream-RSI replay pattern) #107

Closed

Description

@ajianaz

What (description of the change)

Adopt the replay-evaluation pattern from Dream-RSI (arXiv:2609.14858, Google/DeepMind, Sep 2026): evaluate prompt/policy revisions offline against recorded mission traces before they reach the default prompt or tool-discipline heuristics.

Three pieces, all inside the existing evals harness (issue #73) — no new infra:

  1. Trace archive — evals/tier2/run.py currently judges a mission and then deletes the session dir (shutil.rmtree). Instead, keep a redacted copy of each mission's session JSONL under evals/traces/<model>/<mission>/<session>.jsonl (redact absolute host paths and long secret-shaped tokens; record model + timestamp in a small meta.json per mission). Also add the model field to results.json (closes the documented gap in diff.py: "results.json carries no model field; the runner trusts the operator").
  2. Trace-diff scorer — new evals/replay/ Rust bin (tole-core dep, same pattern as the embed spike): replay --traces <dir> --incumbent <prompt.txt> --revised <prompt.txt> .... For each recorded mission it reconstructs the message list from the trace (user prompt, redacted tool observations, tool specs), sends one completion call per candidate through the configured Provider (TOLE_*/OPENAI_* env), and compares the produced tool-call sequence against the recorded one. Zero tool executions, zero workspace, no --allow surface.
  3. Monotone selection — the scorer ALWAYS evaluates the incumbent prompt in the same run as any revision (Dream-RSI §3 selection rule) and only reports a winner when the revision is not worse on the trace corpus; output is a per-mission table + SHIP: <incumbent|revised-N> line.

evals/README.md gains a Tier 2.5 — offline trace replay section: replay is an advisory pre-check for prompt/policy revisions; live Tier-2 missions remain the release gate.

Why (the problem you're solving)

Today a prompt/policy revision can only be validated by another live run (cost + noise), and the decision+outcome data each mission already paid for — what Dream-RSI calls a replay simulator — is thrown away after one scoring pass. Offline replay gives cheap, deterministic-ish feedback for the common case (prompt wording, tool-discipline tweaks) while keeping live missions for what replay cannot cover (real tool effects).

Scope note: this adopts Dream-RSI's evaluation pattern only. Tole remains chat-first (v1.1); no discovery loop, no session-branching product changes.

Testing (how you verified this works)

  • Tier-2 live run archives redacted traces: verify no raw /tmp/... workspace paths or secret-shaped strings in evals/traces/.
  • Replay of the incumbent prompt against its own fresh traces scores ≥ incumbent everywhere (sanity: replay≈live agreement).
  • A deliberately degraded revision (stripped tool-discipline prompt) scores worse than the incumbent → scorer reports SHIP: incumbent (monotone-selection demo).
  • cargo test -p tole-core --test evals_tier1 still green; Evals CI job green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions