agentleFS
heidihelenaheidihelena/citevahti/.claude/skills/prescreen-benchmark/SKILL.md

prescreen-benchmark

Skill1 starsChanged 4 months agoApache-2.0View on GitHub

Benchmark local LLMs (Ollama models such as qwen3:14b, hermes3:8b) as CiteVahti citation prescreening agents on a chosen topic, and build the publication-style prescreen report + a dedicated CiteVahti store from the run. Use this whenever the user wants to test how well small/local models rate claim-vs-source support, add a new topic/theme to the prescreen study, compare models against Claude or against a guideline anchor, compute agreement / Cohen's kappa, produce a shareable results page "to show on the website", grow the de-identified validation corpus, or investigate where a model's ratings go wrong (the "unclear" blind spot). Trigger on phrases like "test my local models as prescreeners", "benchmark qwen/hermes", "new theme/topic for the prescreen study", "build a claim corpus for X", "how well does a laptop model prescreen citations", or "run the prescreen benchmark on <topic>" — and on "a new theme for the Atlas", which is what this report used to be called (see the naming note below).

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never touch the real pilot ledger: Every run ingests into a *separate* root (~/Documents/CiteVahti-<theme>).

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prescreen benchmark — local LLMs as CiteVahti prescreening agents

This skill runs the experiment: take a topic, author a small corpus of claim ↔ cited-source pairs each with an independently-authored anchor label, have local Ollama models (plus a Claude column) prescreen every pair blind, then measure agreement, ingest the run into a dedicated CiteVahti store, and render a self-contained prescreen report.

Naming. This report is not the Atlas. In CiteVahti, Atlas means the panel's claim↔evidence graph (nodes and links — panel/web/evidence-map.js, Spine layout). What this skill renders is a scoreboard and a rating matrix, so it is called the prescreen report (scripts/report.py). Pages published before this rename still carry the old "Evidence Atlas" masthead; leave them as they are.

CiteVahti is a local-first citation-integrity tool used in live pilots with real researchers. A benchmark that overstates what a laptop model can do — or that quietly grades a model against its own author — is exactly the kind of self-flattering evidence this product exists to prevent. So the guardrails below are load-bearing, not decoration.

Non-negotiable guardrails (read first)

  1. The anchor must be authored independently of every rater. Agreement is not accuracy (house doctrine). If the same author writes the claims and the anchor and rates them, a 100% score is self-consistency, not correctness. Best: the clinician/domain expert (or a cited guideline document) supplies the anchor labels; the models — Claude included — are then scored against that anchor through the identical blind prompt. Whenever the anchor was NOT independently authored, say so in the write-up.
  2. Frozen vocabulary. Exactly four coarse labels: supports, contrasts, unclear, not_relevant. Never invent a new scale. (ingest.py maps these onto CiteVahti's canonical 7-value support vocabulary.)
  3. Never touch the real pilot ledger. Every run ingests into a separate root (~/Documents/CiteVahti-<theme>). The founder's ledger at ~/Documents/CiteVahti is off-limits.
  4. Blind + human-first. Models never see the anchor. In the store the anchor is the human rating; the model is the blind AI second opinion; divergences are adjudicated to the anchor.
  5. Trust language. In any report copy: check / assess, never verify / prove / guarantee. The report already carries the "agreement ≠ accuracy" caveat — keep it.

See references/method.md for the full method, the confound analysis, and the findings so far.

Prerequisites

  • Ollama running with the models pulled (ollama list). qwen3:14b and hermes3:8b are the defaults; override with LOCAL_MODELS="a,b" and THINKING_MODELS="a" (thinking models need think:false).
  • Python (stdlib only for bench.py/report.py/prompt_v2.py). ingest.py imports citevahti, so run it with PYTHONPATH=<repo>/src or an installed citevahti.
  • Pick a work directory for outputs, e.g. ~/Documents/prescreen-runs/<theme>/, and run the commands from there (all scripts read/write relative to the current directory).

The pipeline

Let SK=.claude/skills/prescreen-benchmark and REPO = this repo root.

  1. Author the seed. Copy $SK/seeds/_TEMPLATE.json to <theme>.json, set theme, and write ~40 pairs. Aim for a spread across all four labels, and deliberately include genuine unclear cases (on-topic snippet that does not resolve the claim) and a few not_relevant ones — that is where models fail and where the benchmark earns its keep. Existing seeds in $SK/seeds/ are worked examples. The anchor (ref_status) should come from the domain expert / guideline, not from the model that will be graded.
  2. Run the benchmark (queries the local models; caches so re-runs only hit changed pairs):
    python3 $SK/scripts/bench.py <theme>.json _<tag>
    → results_<tag>.json, validation_records_<tag>.jsonl, ratings_cache_<tag>.json.
  3. Render the report:
    python3 $SK/scripts/report.py results_<tag>.json report_<tag>.html
    For a nicer masthead on a brand-new theme, add a META entry in report.py; the fallback works without one. The report adapts to whatever raters the run holds — any number of local models, with or without a reference peer. A rater whose column is null (e.g. the Claude column omitted because Claude authored the claims) is reported as absent, never as 0% agreement. Publish the HTML as an artifact if the user wants a shareable page.

3b. (Optional) Put the run on the public leaderboard. The board is open to any rater — a local model, a hosted API, an ensemble, a human expert — screening the same published items. Submitters send per-item verdicts; scores are computed by whoever holds the answer key, never taken from the submitter.

python3 $SK/scripts/suite.py export <theme>.json "<theme>@v1" .   # public suite + PRIVATE key
python3 $SK/scripts/suite.py pack suite_<theme>@v1.json --out submission.json \
    --from-results results_<tag>.json --key key_<theme>@v1.json \
    --rater qwen3:14b --rater-kind local --prompt-id prescreen-v1 --prompt-hash <sha>
python3 $SK/scripts/suite.py validate submission.json verdicts.jsonl suite_<theme>@v1.json

Anchors are held out: in these seeds the stratum is the anchor (A=supports, B=contrasts, C=not_relevant, D=unclear) and ids are A01/B03, so export re-ids to opaque i001… and reshuffles. Never publish or commit key_*.json. A submitter who is not you needs only the public suite file and suite.py template to produce a verdicts file. Ingest into Neon lives in the CorpusVahti repo (scripts/bench-ingest-run.mjs, sql/bench.sql).

  1. Build a dedicated CiteVahti store and view it:
    citevahti --root ~/Documents/CiteVahti-<theme> init
    PYTHONPATH=$REPO/src python3 $SK/scripts/ingest.py results_<tag>.json ~/Documents/CiteVahti-<theme> [panel_model]
    PYTHONPATH=$REPO/src citevahti-panel --root ~/Documents/CiteVahti-<theme> --port <free_port>
    panel_model (default qwen3:14b) is the local model whose blind rating becomes the store's AI second opinion; it must be one of the benchmarked models. Use a port other than any panel already running (8790, 8791, 8792 are in use by earlier runs).
  2. (Optional) Workflow / prompt test. To check whether a model's errors are a prompt gap vs a capability ceiling, re-run with the "unclear"-scaffolding v2 prompt and diff against v1:
    python3 $SK/scripts/prompt_v2.py <theme>.json results_<tag>.json

Reporting

Lead with the per-model agreement + Cohen's κ vs the anchor, then the divergences (which labels, which direction). Always restate: the anchor is the reference, not ground truth about patients; and note whether the anchor was independently authored. If it was not, that limitation goes at the top, not the footnote.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.