Synthetic Data Pipelines › Generation: Where the Raw Material Comes From
Language AI HandbookAll chapters Choose the teacher, the prompt, and the decoder for the task types you need. A downstream selector can only select from candidates that generation supplies.
Assess generation and selection separately. Check whether acceptable candidates for a task occur in the raw pool, then estimate how often your filters retain those candidates.
Choosing the teacher
Teacher–student distillation uses one model to generate training outputs for another. Other pipelines synthesize both sides of an instruction pair or combine a generated side with human text:
- Self-instruct. Wang et al. (2023) seeded a task pool with 175 human-written examples, generated instructions and instances, and filtered the additions. Self-Instruct, §2.2.
- Instruction backtranslation. Li et al. generated candidate instructions from human-written web passages. A seed instruction model rated how well each passage answered its inferred instruction on a five-point rubric. Self-Alignment with Instruction Backtranslation, §§2.2–2.3.
- Evolutionary rewriting. Xu et al. introduced WizardLM's Evol-Instruct in a 2023 preprint. Its rewrites can add constraints, deepen the task, make it more concrete, or request more reasoning steps. WizardLM, §3.1.
- Seedless prompting. Magpie gave an aligned model its chat template up to the slot for the user message. The model filled that slot with an instruction, then generated its response in a second step. Magpie, §2, ICLR 2025.
- Program-aided generation. Sample a program, execute it to get a reference answer, then express the task in natural language. The worked example uses fixed arithmetic templates.
These methods can be combined. Choose the generation method and the checks together. For an instruction rewrite, a rubric or a human review can assess the transformation. For arithmetic generated from a program, execution supplies an independent check on the response's final number.
A program can supply a reference answer before the task is rendered. This requires a program that represents the intended task and an execution environment appropriate for the inputs.
The text still has to express the same task as the program. For example, a story in which Ben gives himself eight stickers describes a different transaction from one where a second person gives Ben eight. Check the rendering separately from the final answer.
Prompt design as distribution design
Compare prompts under a fixed teacher and decoding setup. For example, contrast “write a math word problem” with “write a two-step problem whose second operation is multiplication and whose answer is between 20 and 60.” Measure the share of valid two-step problems under both prompts.
The prompt conditions the model's next-token distribution. At a fixed prefix, temperature rescales the logits before sampling. Because a sampled token becomes part of the next prefix, temperature can also change the mix of tasks you see across complete outputs.
The practical techniques:
- Seed conditioning. Try human-written examples that span the task types you want. Compare generated coverage with and without the seed examples.
- Metadata-first generation. Choose a topic, difficulty, and format outside the model for each generation request. Track coverage after verification, since assigned requests can be rejected or yield a different kind of item.
- Negative constraints. If you want to exclude names or number ranges, state the exclusions and verify compliance on a sample.
- Persona and register variation. Keep the task fixed and ask for different audiences or registers. Check whether the resulting texts vary in the surface features you intend.
Planning assignments across a metadata grid controls which requests go to the model. To meet a target number of valid items per cell, count accepted responses by cell and resample where needed. Include extra requests and checks in your cost estimate.
Version prompt templates and record their content hashes. Keep the template itself so the hash can be checked later.
If you regenerate half a corpus after a prompt edit, record which rows came from each revision. The template hash can identify a recorded revision, while evaluating the effect of the change needs a comparison that controls other inputs.
Decoding parameters and the diversity/error tradeoff
Temperature rescales logits before the softmax:
As approaches zero from above, the probability mass concentrates on the largest logit or is divided among tied maxima. For a fixed finite set of logits, very large temperatures approach a uniform distribution. Top- sampling retains the smallest probability-ranked prefix with cumulative mass at least , then renormalizes over it. Holtzman et al., §3.1.
Temperature reshapes the distribution before truncation, which may also change which tokens enter the nucleus. Compare the resulting diversity on the task and sampling setup you intend to use.
Higher temperature flattens the softmax at a fixed prompt. Its effect on errors depends on which continuations are correct. The worked simulator changes several settings together, including the answer-error rate, and reports the resulting yields for that design.
Compare decoding settings using the number and variety of items that pass the same verifier.
More candidate samples can raise verification cost. Measure that cost alongside accepted diversity when choosing a sampling setting.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!