arborist/bench
russell@unturf.com f927298353
qa: capacity metrics — prompt-char accounting for strict-rate vs input-size analysis
Per-call accounting of prompt capacity so we can answer 'does
context size affect strict-rate?' at aggregate scale.

Per-call result dict gains:

  "prompt_chars": {
    "system_prompt":      <int>,  # system message chars
    "grounding_reminder": <int>,  # restated rule message (if any)
    "user_question":      <int>,  # the original question text
    "evidence_or_context":<int>,  # rendered evidence map / wikitext context
    "messages_total":     <int>,  # sum of all messages[].content
  }
  "answer_chars": <int>            # rendered answer length

Char-level for now: model-agnostic, fast, and a workable proxy
for prompt tokens (~4 chars/token English prose, ~2.5 for JSON-
evidence-block heavy contexts). Token-exact accounting can layer
on later if a tokenizer is cheap enough to wire in per-call.

Surfaces in three places:

(1) result["prompt_chars"] — for programmatic callers. Cache hits
    return prompt_chars too (computed before lookup).
(2) `aborist query` human render — one-liner showing the breakdown
    and the answer length, so an operator can tell at a glance
    whether STRICT came from a 5KB tight prompt or a 60KB stuffed
    context.
(3) bench/qa_sweep.py — per-row prompt_chars_{total,evidence,system,
    question} + answer_chars columns in the JSONL, plus a new
    "strict-rate by prompt size" section in the markdown summary
    bucketing runs by capacity (<8KB, 8-16KB, 16-32KB, 32-64KB,
    >=64KB) so the bench reveals whether input size correlates
    with verdict quality across modes.

Never enters cache_key — runtime measurements, not policy.
2026-05-01 10:34:25 -04:00
..
qa_questions.txt qa: positive-form prompts + atomic-claim rule; great-wall fixture 2026-04-30 18:00:22 -04:00
qa_sweep.py qa: capacity metrics — prompt-char accounting for strict-rate vs input-size analysis 2026-05-01 10:34:25 -04:00
run.sh progress reporter + structured benchmark 2026-04-27 11:37:20 -04:00