What's New
v0.47.0 — Data Forge: Synthetic-data pipeline with full provenance + a lighter-weight data-quality scorecard. Two CLIs, one philosophy: every synthetic row carries its audit trail, and every quality check is pure-Python so it runs anywhere — no GPU, no 200 MB Presidio model.
Synthetic Data Forge
soup data forge --docs <dir> --task sft|preference|tool --target-rows N— multi-stage pipeline: chunk documents → call a judge → active-learning prune via Jaccard distance → JSONL output plus a separate provenance manifest linking every synthetic row back to source doc + judge label + filter score. 10 000-doc cap; closed task allowlist; atomic staged-tempfile writes;os.lstat + S_ISLNKrejection on every write target. Live Ollama / Anthropic / vLLM judge providers wire through--judge-providerin v0.47.1; the in-tree default is a deterministic offline stub.
Data Quality Scorecard
soup data score --input rows.jsonl— composite scorecard: PII flagged, toxic flagged, language distribution, educational-value mean, decontamination removed. Pure Python, no heavy deps.soup data decontaminate --benchmarks mmlu,gsm8k,humaneval— drops rows that overlap public benchmarks via n-gram containment. Closed benchmark-name allowlist (mmlu/gsm8k/humaneval/truthfulqa/arc/hellaswag).soup data toxicity / langdetect / pii / educational— standalone subcommands, JSONL-in, enriched JSONL-out. Compose freely.
ReDoS hardening
- Phone + credit-card PII regexes rewritten to eliminate nested optional quantifiers; input pre-capped to 50 KB before
finditer. Pathological near-miss inputs (100 KB of"1 " * N + "x") complete promptly instead of hanging.
Stats
- +116 net new tests (6126 → 6242).
- All five review agents (python / code / security / TDD / verification-loop) green after CRITICAL→LOW fixes applied.
Install / Upgrade
pip install --upgrade soup-cli==0.47.0Security
- ReDoS-hardened PII regex set; 50 KB pre-cap on
detect_pii. math.isfiniteguard on every unit-float validator (NaN AND ±Inf rejected before bounds check).is_under_cwdcontainment on every input + output path;os.lstat + S_ISLNKrejection at every write target.- Atomic writes via
tempfile.mkstemp+os.replace— mid-stream failure never leaves a partial file. _require_strrejects null bytes consistently acrossdata_forgeanddata_score.compute_scorecardper-row exceptions logged at DEBUG (no silent swallow).- All user-controlled strings in CLI output pass through
rich.markup.escape.
Known Limitations
- Live judge providers deferred to v0.47.1 —
soup data forgeships with a deterministic offline echo stub only; live Ollama / Anthropic / vLLM via--judge-providerlands next. Stub-then-live pattern matches v0.27.0 MII / v0.37.0 multipack / v0.46.0 Part A. - Decontamination benchmark corpora not bundled —
--benchmarksvalidates the flag but operates on an empty corpus; operator-supplied--benchmark-filelands in v0.47.1. [data-pro]extras deferred — Llama-Guard-3-1B variant for toxicity, FineWeb-Edu classifier for educational value, full Presidio for PII, fastText / langdetect for language detection all ship behind opt-in extras in v0.47.1.- Provenance manifest stores absolute realpath in
source_doc— operators sharing manifests publicly should redact paths before publishing; kept as-is for audit-trail completeness.
🤖 Generated with Claude Code