cd /news/ai-tools/diffing-saved-jsonl-batches-of-ai-ou… · home › topics › ai-tools › article
[ARTICLE · art-182811] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

Diffing saved JSONL batches of AI outputs locally by ID

A developer built batchdiff, a small open-source Rust CLI that diffs two saved JSONL batches of AI outputs by id field, flagging changed, added, and unchanged records without re-calling the model. The tool reports field-level changes such as a priority shifting from high to low, supports scoped field comparison, ignore paths, and markdown output for pull requests, and runs entirely locally with no network calls.

key takeaway

Diffing two saved JSONL output batches by id locally catches semantic changes like a priority flipping from high to low that JSON schema validation passes, without re-running the model.

by read1 min views1 publishedDec 6, 2026

When you change a prompt or swap a model, JSON schema validation checks whether the output shape is valid, but a ticket changing from high priority to low still passes the schema.

Eval runners like Promptfoo handle end-to-end runs well, and Ajv handles schema checks. I needed something smaller: I already had two exported JSONL files (baseline.jsonl and candidate.jsonl) on disk and wanted to diff them by id locally without calling the model again.

I wrote a small Rust CLI for this called batchdiff.

fixtures/baseline.jsonl:

{"id":"T-01","priority":"high"}
{"id":"T-02","priority":"low"}

fixtures/candidate.jsonl:

{"id":"T-01","priority":"low"}
{"id":"T-02","priority":"low"}
{"id":"T-03","priority":"medium"}

Run it against the included fixtures:

git clone https://github.com/mrfrost1110/batchdiff.git
cd batchdiff
cargo run -- fixtures/baseline.jsonl fixtures/candidate.jsonl

Output:

T-01 | /priority | high → low | changed
T-02 | unchanged
T-03 | /priority | medium | added
Summary | 1 changed, 1 unchanged, 1 added

If you want the binary on your PATH, you can also install it directly:

cargo install --git https://github.com/mrfrost1110/batchdiff
batchdiff baseline.jsonl candidate.jsonl

id fields, or scoped with --field <path> --ignore <path> (for example --ignore meta/latency_ms)--format markdown for pull requests2 and line numbers on malformed JSON, missing or blank Everything runs locally with no network calls.

Repo: https://github.com/mrfrost1110/batchdiff

If you save LLM extraction outputs to JSONL before shipping prompt changes, how are you diffing them today, and what breaks most often in your workflow?

── more in #ai-tools 4 stories · sorted by recency
── more on @batchdiff 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/diffing-saved-jsonl-…] indexed:0 read:1min 2026-12-06 · —