← Back to Docs
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

  1. Ingest docs

    Run meridian ingest ./docs --format markdown to parse and chunk your documentation.

  2. Generate pairs

    Execute the pair generator with a coverage threshold to ensure broad topic distribution across the output set.

  3. Validate output

    Review generated pairs for hallucination and factual accuracy before exporting.

  4. 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": "..."}]}