Skip to content

docs: use gpt-4o-mini in OpenAIGenerator and DeepEvalEvaluator examples#11722

Open
camgrimsec wants to merge 1 commit into
deepset-ai:mainfrom
camgrimsec:docs/openai-generator-cheaper-default-example
Open

docs: use gpt-4o-mini in OpenAIGenerator and DeepEvalEvaluator examples#11722
camgrimsec wants to merge 1 commit into
deepset-ai:mainfrom
camgrimsec:docs/openai-generator-cheaper-default-example

Conversation

@camgrimsec

Copy link
Copy Markdown
Contributor

Replace 'gpt-4' with 'gpt-4o-mini' in the basic-usage examples for OpenAIGenerator and DeepEvalEvaluator on the docs website.

Rationale:

  • gpt-4o-mini is OpenAI's current cost-efficient default — $0.15/$0.60 per M tokens vs gpt-4 at $30/$60 (~200x cheaper input, ~100x cheaper output).
  • The surrounding prose (e.g. 'OpenAIGenerator supports OpenAI models starting from gpt-3.5-turbo and later (gpt-4, gpt-4-turbo, and so on)') remains accurate — these examples are not contracts about which model the user must pick, only what a copy-pasted first run will cost.
  • Users running the doc snippet verbatim today incur ~200x more cost than needed for a 'hello world' generator example.

No code changes. Component constructors remain unchanged — the user explicitly passes the model name. Docs only.

Related Issues

  • fixes #issue-number

Proposed Changes:

How did you test it?

Notes for the reviewer

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines.
  • I have run pre-commit hooks and fixed any issue.

Replace 'gpt-4' with 'gpt-4o-mini' in the basic-usage examples for
OpenAIGenerator and DeepEvalEvaluator on the docs website.

Rationale:
- gpt-4o-mini is OpenAI's current cost-efficient default — $0.15/$0.60
  per M tokens vs gpt-4 at $30/$60 (~200x cheaper input, ~100x cheaper
  output).
- The surrounding prose (e.g. 'OpenAIGenerator supports OpenAI models
  starting from gpt-3.5-turbo and later (gpt-4, gpt-4-turbo, and so on)')
  remains accurate — these examples are not contracts about which model
  the user must pick, only what a copy-pasted first run will cost.
- Users running the doc snippet verbatim today incur ~200x more cost than
  needed for a 'hello world' generator example.

No code changes. Component constructors remain unchanged — the user
explicitly passes the model name. Docs only.
@camgrimsec camgrimsec requested a review from a team as a code owner June 22, 2026 19:41
@camgrimsec camgrimsec requested review from anakin87 and removed request for a team June 22, 2026 19:41
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

@camgrimsec is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant

CLAassistant commented Jun 22, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@anakin87 anakin87 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please copy these changes to https://github.com/deepset-ai/haystack/tree/main/docs-website/versioned_docs/version-2.30 (stable docs) and sign the CLA.

Then ping me for another review...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants