CSV training rows → OpenAI chat-format JSONL, mapped and validated.
{"messages":[{"role":"user","content":"Explain closures in one sentence."},{"role":"assistant","content":"Closures capture variables so inner functions keep access after the outer call returns."}]}
{"messages":[{"role":"user","content":"Translate: hello"},{"role":"assistant","content":"Bonjour"}]}📚 Output is the chat-messages JSONL the OpenAI fine-tuning API expects. Rows with empty assistant cells are flagged (not dropped) so you can fix the source. Quotes and commas inside cells are handled per RFC 4180.
Each training example is one JSON line containing a messages array — the same chat structure as the API. This converter maps your CSV columns onto system/user/assistant roles and emits valid .jsonl directly.
Name the columns in the three fields above; a system column is optional and omitted from rows where the cell is empty. The header row is consumed, not exported.
Rows with empty assistant cells are flagged with their line number instead of silently dropped — training on empty completions quietly ruins runs. Quotes and embedded commas follow RFC 4180.
Hundreds of examples teach style; thousands teach behavior. Before fine-tuning at all, try few-shot prompting — many "needs fine-tuning" tasks are actually prompt-engineering tasks.
More tools you might find useful
Embedding costs across models: dimensions, $/1M tokens, workload totals.
Estimate tokens and API cost for GPT, Claude, and Gemini prompts.
Rescue malformed LLM JSON — truncated, trailing commas, fences.
Paste JSON, get a typed Zod schema — AI output validation ready.