Skip to main content
The hardest part of getting started with evals is having nothing to evaluate against. multivon-eval generates cases for you: point it at your documentation and get question-answer pairs in seconds, or expand an existing set with mutations, template grids, and contrast pairs. Two of the generators run with no LLM at all. Every generator stamps provenance (authored_by="generator:<kind>", seed recorded), routes through the dedupe gates, and returns an accounting report: generated N, accepted M — dropped k duplicates, j malformed.

Generate QA cases from docs

generate_from_file() reads a text file and produces question-answer cases grounded in it:

From raw text

generate_from_text() takes the source string directly (same params as generate_from_file plus context_window):
context_window (int, default 3000) caps the characters of source included per generation prompt; long inputs are split into overlapping chunks.

Task types

  • qa (default) — question/answer pairs with context excerpts. Each case has input (the question), expected_output (the answer), and context (the excerpt). Best for RAG, chatbots, and knowledge-base evaluation.
  • summarization — document chunks with faithful reference summaries. input is the chunk, expected_output is the summary.
  • hallucination — faithful-answer cases (expected_output="faithful"). Pair with the Hallucination evaluator to verify your model doesn’t fabricate.

Hallucination benchmark pairs

generate_hallucination_pairs() returns both faithful and hallucinated answer variants — useful for building your own labeled benchmark (HaluEval-style):

Mutations (free)

CheckList-style robustness suites from cases you already have. Each mutant records its transformation and what you should expect: invariant (the model’s answer shouldn’t materially change) or flip (the old label no longer applies — the expectation is cleared, never silently kept).
Deterministic per seed. Zero LLM calls.

Template grids (free)

Parametric coverage over axes you define. sample="all" is the full product (capped at 2000); sample="pairwise" is a greedy covering array that hits every value pair at least once.
Rows without expected_output are valid — judge evaluators score outputs without a reference answer. No label is ever invented.

Contrast pairs

For each passing case, an LLM proposes a minimally-edited unfaithful twin, and a judge verifies the flip is real before the twin is accepted. Rejected twins are counted in the report, not kept. Twins share a pair_id with their source case, so downstream comparisons are genuinely paired.

Simulation transcripts as datasets

multivon-eval simulate ... --export-cases cases.jsonl turns persona conversation transcripts into conversation-shaped EvalCases (empty transcripts are skipped and counted). See the simulate guide.

CLI

Tips

  • Start small — generate 10-20 cases first, review them, then scale up.
  • Use your actual docs — cases from your real content catch real problems.
  • Mix with manual cases — generated cases cover breadth; manual cases cover the edge cases you already know about.
  • Task choice mattersqa for RAG, summarization for summarization pipelines, hallucination to stress-test faithfulness.