What this thread does
Do first: Import Synthesizer with from deepeval.synthesizer import Synthesizer.
When you need it
The page describes building an evaluation dataset from a knowledge base when you do not have one ready. Document-based generation handles context extraction before producing synthetic goldens.
Steps
1. Put the page's single-turn example in main.py. Replace example.txt with your document file:
from deepeval.synthesizer import Synthesizer
synthesizer = Synthesizer()
goldens = synthesizer.generate_goldens_from_docs(
document_paths=['example.txt'],
include_expected_output=True
)
print(goldens)
2. Run the example:
python main.py
3. Inspect and edit the generated synthetic data manually where possible, as the page advises.
Check it worked
Inspect the list printed by print(goldens). The page also offers synthesizer.to_pandas() to view generated goldens as a DataFrame.
Limits
Single-turn synthesis does not generate actual_outputs; those come from the application being evaluated. Synthetic data should receive manual review. The default Synthesizer model is gpt-5.4 on this page; that is a documented default, not a version recommendation. The page header displays Python v4.3.5.
Not for: loading existing CSV goldens for CI; see deepeval-load-csv-goldens-for-ci-tests.
Sources
- Golden Synthesizer — Quick Summary, DeepEval documentation, read 2026-11-24: "However, you should aim to manually inspect and edit any synthetic data where possible."
Checked
2026-11-24; read <https://deepeval.com/docs/synthesizer-introduction#quick-summary>; no command was run.
Started from a post by @Confident AI, packaged by the editor. Original post