AugmentClaude
Apache-2.0TestingML

Loom Benchmark

Run performance benchmarks to measure accuracy, recall, or compare settings against baseline noise.

Installation

  1. Make sure Claude is on your device and in your terminal.

    Skills load from ~/.claude/skills/ when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then run claude in any terminal to verify.

    One-time setup
    npm i -g @anthropic-ai/claude-code

    Already have it? Skip ahead.

  2. Paste into Claude Code or into your terminal.

    This copies the whole skill folder into ~/.claude/skills/loom-bench-clickhouse/ — the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Works for every skill.

    What this command does
    1. Makes a new, empty temporary folder.
    2. Downloads the skill's folder, .claude/skills/loom-bench, from github.com/ClickHouse/loom (branch main), the GitHub repository it's listed from. You get the version that is there now, not a copy we keep.
    3. Copies that folder to ~/.claude/skills/loom-bench-clickhouse/.
    4. Deletes the temporary folder.

    Installing runs none of the skill's files; it only downloads and copies them. When you later use the skill, Claude follows its SKILL.md and may run scripts that come with it. Read them first.

    How we check skills, and what we don't · Report this skill

    Faster alternative (instruction-only skills)

    Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.

    Quick install (SKILL.md only)
    Sign up to copy
  3. Restart Claude Code.

    Quit and reopen Claude Code (or any other agent that loads from ~/.claude/skills/). New skills are picked up on startup.

  4. Just ask Claude.

    Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.

Prefer to read the source first? Open on GitHub.

When Claude uses it

Runs and reports a Loom benchmark — when a paid run is allowed, which harness answers the question, proving the treatment ran, judging a delta against noise. Use when asked to benchmark, measure recall or answer accuracy, A/B a setting, or update docs/benchmarks/results.md. Not for test or CI speed.

What this skill does

Loom benchmarks

0. Ask first

A benchmark run spends provider money and hours of wall clock. Offline harnesses and --help are free; anything that ingests or judges is not. In Claude Code every bench/*.py and make bench* command asks first, --help included. "Keep the bench numbers" means the existing numbers.

Before a paid run, even one the requester asked for, reply with the question, the harness and arms, the item count and repeats, the provider and judge, and whether the treatment can change anything on that dataset (read the code path first: a setting that scores every row of the dataset alike cannot move the result). Start only after a yes to that plan. Use the provider keys the requester's environment already has; never copy a key from another checkout's .env. A run never outlives the session that started it: stop its server, its ClickHouse and the harness before you report.

A benchmark is the confirm step, never exploration: the diagnosis (failing items, their shared pattern, the change and the result it predicts) comes first, and every named part of the change is built before the run.

1. Pick the harness

Name the question first ("does rerank X raise recall@10 on multi-hop without losing single-hop?"), then the harness and the arms that answer it: running lists them, methodology says what each measures. Prefer one paired run (--ask-arms, --repeats 3 --gate) over two separate runs: one ingest, per-item deltas.

2. Run against the code you mean

PYTHONPATH=$PWD .venv/bin/python bench/<harness>.py --help
curl -s "$LOOM_BASE_URL/v1/health" | jq '{build_commit, status}'   # your build, when started with LOOM_BUILD_COMMIT (loom-dev-setup §5)
  • The server is a private one started from this worktree (loom-dev-setup) with real providers; fake providers make every score meaningless.
  • A cached answer path can replay an older build's answers: confirm the cache key covers the setting under test, or turn the cache off for the run.
  • Bench namespaces are erased at the end of the run; pass --keep-namespaces only when a re-score is planned.

3. Prove the treatment ran

Before reading a single score, check from the run's own output or the server's ledger that arm B did what B means: the setting was applied, the tool was called, the leg returned rows. A "no difference" or a big win from an arm that never ran is the most common false result. A "regression" whose items were scored against zero ingested memories is an ingest failure, not a code change: check the ClickHouse log for out-of-memory or DNS errors before reading the scores.

4. Judge the delta

  • A change ships on the lower bound of the paired, clustered bootstrap, not the mean (the verdict).
  • unresolved inside the null band is noise; outside it the run is under-powered — add items, not repeats.
  • An A/A run of the same arm twice is the noise reference for a new harness or judge. At n = 30 a same-config pair swings ±13 pp, a few items either way (how wide the interval is); a few-point delta between two passes is judge noise plus a re-ingest until the bound says otherwise.
  • recall@K and judged QA accuracy are separate axes; never set one beside the other (recall and answer accuracy).
  • Report every category, including the one that went down.

Native coding-agent comparisons

  • Freeze the issue, source, model, instructions and graders across arms. Keep native tool choice. Record advertised tools, actual calls, historical facts delivered before edits and independent verifier outcomes. A one-issue quality tie cannot measure historical memory lift.
  • For a cache-disabled comparison, disable provider prompt caching for every arm and verify zero reads and writes on every model request. With caching enabled, verify each planned starting state from provider usage. If the protocol calls for a cold start, use provider-supported isolation and check the first request for zero cache reads. If it calls for warm reuse, verify the reads on the same arm. A fresh session and an elapsed TTL are setup details. Cache state comes from the receipts. Track Loom-local caching and index preparation separately. See provider usage fields.
  • Compare like cache states. Split first-request usage from later turns and retain uncached input, cache reads, writes by TTL and output. Use the reported solver cost. Show separately tracked Loom provider charges alongside it. Report agent time and full end-to-end time.
  • Check cost and time targets for the same arm and matched baseline within each cache state. Leave the cost target unresolved when only fallback estimates or incomplete upstream charges are available. Compare memory cost, time and quality with the same index tier alone. Report linked facts delivered alongside hidden tests and the blind judge.
  • Compare complete sessions for the same task, repeat and cache start. Join model usage and tool replies by tool call ID. Inspect the request and available source after a miss. For a hidden-test failure, check the submitted edit against the verifier and inspect the source and lesson states delivered before the edit.
  • Count model responses as well as tools. Check the next model response before crediting a smaller payload or a batched lookup with saving a turn. See coding-agent overhead.
  • When literal code.grep excerpts lead to separate implementation and test reads, replay the original clues with default bodies and the test-name clue in one batch. Scope both roots with globs and omit path_prefix. Compare the evidence and size with all original responses. Check the working revision before counting an edited-file read as replaceable.

5. Write it up

  • The PR body carries the numbers, the command that reproduces them, the model and judge, and the item count.
  • Quote a headline number only from docs/benchmarks/results.md, never from memory or an old run.
  • docs/benchmarks/results.md names files by bench and sections by model, never by commit or date (history is rewritten; commit ids rot).
  • A measurement never goes in a code comment.
  • Keep run outputs (bench/matrix_runs/, MATRIX_RESULTS.md, /tmp/*.csv) out of commits.

Related skills