Recipe
Q&A pair generator for fine-tuning datasets
Generate high-quality question-answer pairs from your documentation to fine-tune custom models with Meridian.
Overview
This recipe walks through extracting structured Q&A pairs from markdown docs, validating coverage, and exporting JSONL datasets ready for fine-tuning runs.
Prerequisites
- Meridian CLI v2.4+ installed
- Source documentation in markdown format
- API key with dataset:write scope
Steps
- Ingest docs
Run
meridian ingest ./docs --format markdownto parse and chunk your documentation. - Generate pairs
Execute the pair generator with a coverage threshold to ensure broad topic distribution across the output set.
- Validate output
Review generated pairs for hallucination and factual accuracy before exporting.
- Export JSONL
Write the validated dataset to a JSONL file compatible with Meridian fine-tuning jobs.
Output format
{"messages": [{"role": "user", "content": "..."}, {"role": "assistant", "content": "..."}]}