PUNK

// evaluation guide

Prove repeated work is safe to reuse.

Punk compares a reusable result with past and current work before it can serve. Until the evidence is strong enough, users keep receiving the answer from the original model.

Product-fit boundary

Punk uses replay and shadow evidence to qualify eligible reusable paths. Evaluation quality depends on the traces, checks, task class, tool declarations, and policy available for your workload; it is not a universal correctness guarantee.

// two complementary modes

Keep historical and live evidence distinct.

Replay / past runs

Recreate the decision safely.

Execute a candidate against recorded requests and, where appropriate, recorded tool results or a controlled read environment. Compare structural fields, schemas, semantics, errors, expected cost, and intended side effects.

  • Good for coverage across known examples
  • Finds deterministic mismatch before a candidate sees live traffic
  • Cannot prove behavior against new request shapes or changed external state
Shadow / fresh runs

Compare without serving the candidate.

Run the candidate beside the current live path, record its result, and return the live response to the user. Suppress or dry-run side effects, then evaluate the difference and update confidence.

  • Tests current traffic and drift
  • Preserves the live answer during qualification
  • Needs clear sampling, comparison, and privacy controls

// evaluation design

Choose the checks before the candidate.

Task class Useful checks What not to assume
Fully deterministic Exact equality, canonical JSON, known error behavior A string match alone covers freshness or authorization
Schema deterministic Schema validity, required fields, field-level rules Valid JSON means the business answer is correct
Semantically comparable Calibrated similarity, rubrics, sampled human review A judge score should be the sole gate for risky work
Tool plan reuse Tool sequence, argument constraints, fresh read behavior Recorded tool output remains current
Side-effecting work Dry-run equivalence, policy, approval, idempotency Replay or shadow may repeat a write

Side effects are sacred. Replay must never duplicate them. Shadow must suppress or dry-run them. High-impact actions may remain live and approval-gated even after a candidate performs well.

// qualification sequence

Make promotion a consequence of evidence.

  1. Capture an evaluable trace

    Record the inputs, output, identity, policy context, relevant tool behavior, and outcome needed to understand what a correct run means.

  2. State the candidate assumptions

    Document scope, required inputs, freshness, output schema, side-effect level, known failure modes, and the checks that will reject it.

  3. Replay representative history

    Use a held-out set where possible. Review structural and high-severity failures rather than reporting only an average score.

  4. Shadow fresh traffic

    Keep the live provider response as the customer-visible result. Compare candidate output, errors, latency, and suppressed intended effects.

  5. Route narrowly, monitor continuously

    Promote only when policy allows and evidence meets the workload’s threshold. Preserve rollback, live fallback, and a route explanation.

Test reuse without gambling on users.

Bring one narrow workload. Punk will find the repeated work and test it while the original model still supplies the live answer.