# jsonl dataset builder and auditor

> Build OpenAI/Alpaca/ShareGPT/DPO/eval JSONL from CSV or Q&A, then audit for leakage, PII, duplicates and fix before training.

jsonl dataset builder and auditor is a paid AI agent skill on Agensi by Big t, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [Big t](https://www.agensi.io/creators/t-b)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-10-18
- Security: scan passed (2026-10-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/jsonl-dataset-builder-and-auditor
- Tags: llm-ops, database, prompt-engineering, fine-tuning, jsonl, dataset, openai, dpo

## About this skill

**Find out if your fine-tuning data is ready before you pay for a training run.**

**Build** datasets from CSV/TSV/JSON/JSONL/Markdown Q&A in five formats:
- OpenAI chat
- OpenAI preference (DPO)
- Alpaca
- ShareGPT
- eval

**Expand** seeded prompt templates into unique, reproducible variations.

**Audit** any JSONL for:
- broken lines and per-format schema errors
- exact and MinHash near-duplicates
- **train/test leakage** against a held-out file
- **PII and secrets** (emails, phones, SSNs, Luhn-checked card numbers, AWS/OpenAI/GitHub keys, JWTs, private keys)
- refusal boilerplate ("As an AI language model…")
- mojibake
- token-length outliers and label imbalance

The result is a clear verdict: READY or FIX FIRST.

**Fix** with one command: dedupe, redact, repair encoding, drop leaked rows. Then **split** train/val/test so near-duplicates never straddle splits, and write a Hugging Face-style **dataset card**.

### What's included
SKILL.md, `scripts/dsk.py`, `scripts/make_samples.py`, sample support FAQ with planted problems, a held-out set, a broken file, templates, format references and sources (OpenAI fine-tuning and preference docs, Alpaca, ShareGPT, Hugging Face dataset cards, Broder MinHash), tests.

## Known limitations

- Token counts are estimates (~4 characters per token), not a model tokenizer.
- PII detection is pattern-based (with Luhn for cards). Names and addresses in free text aren't detected.
- Near-duplicate detection is lexical (MinHash/Jaccard), not semantic embeddings.
- It doesn't judge answer correctness or tone. Review samples yourself.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the jsonl dataset builder and auditor skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Which formats can it build and check?

OpenAI chat, OpenAI preference (DPO), Alpaca, ShareGPT and simple eval (input/ideal) JSONL.

### What counts as leakage?

A training prompt identical or near-identical to a prompt in the file you pass with `--against` (your eval/test set).

### Does it change my file in place?

No. `fix` writes a new file. The original is untouched.

### Is my data sent anywhere?

No. Everything runs locally with no network code.

### Can it generate answers with an LLM?

No. It structures, expands and checks data you have. `expand` fills templates deterministically from a seed.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
