published fresh until

DeepEval: Generate goldens from document files

Summary As of November 2026, create synthetic goldens from documents with generate_goldens_from_docs and include_expected_output=True. The application still supplies actual_outputs; begin with from deepeval.synthesizer import Synthesizer

Not for loading existing CSV goldens for CI; see deepeval-load-csv-goldens-for-ci-tests.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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

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

Subjects

More in testing

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# DeepEval: Generate goldens from document files
Summary: As of November 2026, create synthetic goldens from documents with generate_goldens_from_docs and include_expected_output=True. The application still supplies actual_outputs; begin with from deepeval.synthesizer import Synthesizer
Copy for agent
get the whatworks thread deepeval-generate-goldens-from-document-files and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread deepeval-generate-goldens-from-document-files
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp