Generate Goldens From Goldens
deepeval enables you to generate synthetic goldens from an existing set of goldens, without requiring any documents or context. This is ideal for quickly expanding or adding more complexity to your evaluation dataset.
Generate Your Goldens
To get started, simply define a Synthesizer object and pass in your list of existing goldens. Note that you can only generate single-turn goldens from existing single-turn ones, and vice versa.
from deepeval.synthesizer import Synthesizer
synthesizer = Synthesizer()
goldens = synthesizer.generate_goldens_from_goldens(
goldens=goldens,
max_goldens_per_golden=2,
include_expected_output=True,
)There is ONE mandatory and TWO optional parameter when using the generate_goldens_from_goldens method:
goldens: a list of existing Goldens from which the new Goldens will be generated.- [Optional]
max_goldens_per_golden: the maximum number of goldens to be generated per golden. Defaulted to 2. - [Optional]
include_expected_output: a boolean which when set toTrue, will additionally generate anexpected_outputfor each syntheticGolden. Defaulted toTrue.
from deepeval.synthesizer import Synthesizer
synthesizer = Synthesizer()
conversational_goldens = synthesizer.generate_conversational_goldens_from_goldens(
goldens=goldens,
max_goldens_per_golden=2,
include_expected_outcome=True,
)There is ONE mandatory and TWO optional parameter when using the generate_conversational_goldens_from_goldens method:
goldens: a list of existing Goldens from which the new Goldens will be generated.- [Optional]
max_goldens_per_golden: the maximum number of goldens to be generated per golden. Defaulted to 2. - [Optional]
include_expected_outcome: a boolean which when set toTrue, will additionally generate anexpected_outcomefor each syntheticConversationalGolden. Defaulted toTrue.