Overview

Synthesizers transform the source samples read by a dataset generator’s data source into the output samples written to the generated dataset. Each synthesizer is defined inline in your dataset generator YAML under the synthesizers key.

# dataset_generators/my_generator.yaml
config_spec:
  - type: "model"
    key: "synthesizer_model"
    display_name: "Synthesizer Model
    default_value: "openai$gpt-4-1-nano
  - type: "dataset"
    key: "dataset_key"
    display_name: "Dataset"
    default_value: "countries"
definition:
  data_source:
    type: "dataset_samples"
    dataset_key: "<< config.dataset_key >>"
  synthesizers:
    - type: "llm"
      model_key: "<< config.synthesizer_model >>"
      use_structured_outputs: true
      user_prompt_template: >
        Write a trivia question about the capital of {{ source.country }}.
      sample_properties:
        question:
          type: string
        answer:
          type: string

A dataset generator can chain multiple synthesizers. They run in order, each consuming the samples produced by the previous one.

The synthesizers read their source samples from a data source, configured under the data_source key of the same dataset generator.

Available Synthesizers

Synthesizer Type value Description
Empty empty Produces no output samples. Used when the data source alone defines the dataset.
Drop Columns drop_columns Removes the named columns from each output sample, keeping all others.
Template template Renders output samples from a Jinja template with a grid of placeholder values.
Python python Generates output samples from each source sample using a custom Python synthesize function.
LLM llm Generates output samples from each source sample using a chat-completion model.
Question Answering question_answering Generates multiple-choice or open-ended QA samples from source text.
Claim Extraction claim_extraction Extracts atomic claims from a candidate answer using an LLM.
Claim Labeling claim_labeling Labels each extracted claim as required or optional for answering the question.
Link Claim Quotes link_claim_quotes Links each extracted claim to the verbatim quotes from the answer supporting it.