{"slug": "diffing-saved-jsonl-batches-of-ai-outputs-locally-by-id", "title": "Diffing saved JSONL batches of AI outputs locally by ID", "summary": "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.", "body_md": "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.\n\nEval runners like [Promptfoo](https://www.promptfoo.dev/docs/guides/evaluate-json/) handle end-to-end runs well, and [Ajv](https://github.com/ajv-validator/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.\n\nI wrote a small Rust CLI for this called [batchdiff](https://github.com/mrfrost1110/batchdiff).\n\n`fixtures/baseline.jsonl`:\n\n```\n{\"id\":\"T-01\",\"priority\":\"high\"}\n{\"id\":\"T-02\",\"priority\":\"low\"}\n```\n\n`fixtures/candidate.jsonl`:\n\n```\n{\"id\":\"T-01\",\"priority\":\"low\"}\n{\"id\":\"T-02\",\"priority\":\"low\"}\n{\"id\":\"T-03\",\"priority\":\"medium\"}\n```\n\nRun it against the included fixtures:\n\n```\ngit clone https://github.com/mrfrost1110/batchdiff.git\ncd batchdiff\ncargo run -- fixtures/baseline.jsonl fixtures/candidate.jsonl\n```\n\nOutput:\n\n```\nT-01 | /priority | high → low | changed\nT-02 | unchanged\nT-03 | /priority | medium | added\nSummary | 1 changed, 1 unchanged, 1 added\n```\n\nIf you want the binary on your `PATH`, you can also install it directly:\n\n```\ncargo install --git https://github.com/mrfrost1110/batchdiff\nbatchdiff baseline.jsonl candidate.jsonl\n```\n\n`id` fields, or scoped with `--field <path>`\n`--ignore <path>` (for example `--ignore meta/latency_ms`)`--format markdown` for pull requests`2` and line numbers on malformed JSON, missing or blank Everything runs locally with no network calls.\n\nRepo: [https://github.com/mrfrost1110/batchdiff](https://github.com/mrfrost1110/batchdiff)\n\nIf 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?", "url": "https://wpnews.pro/news/diffing-saved-jsonl-batches-of-ai-outputs-locally-by-id", "canonical_source": "https://dev.to/mrfrost1110/diffing-saved-jsonl-batches-of-ai-outputs-locally-by-id-1g77", "published_at": "2026-12-06 09:36:11+00:00", "updated_at": "2026-12-06 09:45:22.385056+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "large-language-models"], "entities": ["batchdiff", "Promptfoo", "Ajv", "Rust"], "also_reported_by": [], "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.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/diffing-saved-jsonl-batches-of-ai-outputs-locally-by-id", "markdown": "https://wpnews.pro/news/diffing-saved-jsonl-batches-of-ai-outputs-locally-by-id.md", "text": "https://wpnews.pro/news/diffing-saved-jsonl-batches-of-ai-outputs-locally-by-id.txt", "jsonld": "https://wpnews.pro/news/diffing-saved-jsonl-batches-of-ai-outputs-locally-by-id.jsonld"}}