guide doubleword
Batch extraction with --all-doubleword
Run every Doubleword model in the registry against the Kleister Charity dev set (11 UK financial PDFs, 8 fields).
The extractor submits async batch jobs, polls for completion, checkpoints progress, and writes one TSV per model under data/.
Demo recording
Terminal walkthrough of a full --all-doubleword run — run plan, batch submit, polling, and per-model status.
python extractor.py --all-doublewordBefore you run
1. Environment
- Python 3.13 ·
pip install -r requirements.txt(see QUICKSTART) DOUBLEWORD_API_KEYin.envSKIP_DOUBLEWORD_SYNC=1recommended — preserves manual model-id corrections in the registry
2. Smoke test (optional)
python llm_openrouter.py # confirms API keys & JSON parsing
The command
# All Doubleword registry models (default 1h completion window)
python extractor.py --all-doubleword
# Cheaper / slower — 24h batch window
python extractor.py --all-doubleword --completion-window 24h
# One model only
python extractor.py dw-qwen3.8-27b
What happens
Each model runs sequentially. Already-completed outputs are skipped (idempotent). Ctrl-C preserves checkpoints — re-run the same command to resume.
- 1 Run plan — lists Doubleword models to run, skip (done), or resume from checkpoint.
- 2 Batch submit — OCR text for 11 documents sent to the Doubleword Batch API per model.
-
3
Poll & checkpoint — async status updates; progress saved to
data/.doubleword_checkpoints.json. -
4
TSV output — structured fields written to
data/playgroup_dev_extracted__doubleword__<model>.tsv. - 5 Summary — completed / skipped / interrupted / failed counts per model.
Partial failures: rejected rows are logged and stored in
data/.doubleword_failed_rows.json.
Re-run with python extractor.py --retry-failed (or add model names) to merge fixes back into existing TSVs.
Output files
| File | Purpose |
|---|---|
data/playgroup_dev_extracted__doubleword__*.tsv | Per-model extraction results |
data/extraction_stats.csv | Time, cost, field hits per run |
data/.doubleword_checkpoints.json | Resume state for in-flight batches |
data/.doubleword_failed_rows.json | Row indices for --retry-failed |
data/.doubleword_unavailable_models.json | Models that failed on submit (skipped next run) |
Related commands
Other providers
python extractor.py --all-openrouter # OpenRouter models (sync)
python extractor.py --all-v7 # V7 Go agents
python extractor.py # everything in all registries
After extraction
python score.py # F1 leaderboard across all TSVs
python playground.py # regenerate which-models-extracted-playground.html
View results on this site via the playground archive or the project findings page.
Flags reference
| Flag | Effect |
|---|---|
--all-doubleword | Run only config_models_doubleword.py keys |
--completion-window 1h|24h | Doubleword batch SLA (default 1h) |
--retry-failed | Re-submit failed rows and merge into existing TSVs |
<model> | Run one or more named models (any provider) |