Compare GPT-4o and GPT-4o Mini Models
Promptfoo eval config benchmarking GPT-5 vs GPT-5 Mini on riddle-solving, with cost/latency/rubric assertions.
Why it matters
Evaluate and contrast the capabilities of OpenAI's GPT-4o and GPT-4o Mini models. Understand their performance differences to select the optimal model for your specific AI application needs.
Outcomes
What it gets done
Run a comparative analysis of GPT-4o and GPT-4o Mini.
Summarize the key differences in performance and features.
Classify the strengths and weaknesses of each model.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/pfoo-compare-gpt-4o-vs-4o-mini | bash Overview
Compare Gpt 4O Vs 4O Mini
A promptfoo eval config benchmarking two OpenAI models (configured as GPT-5 and GPT-5 Mini despite the GPT-4o title) on riddle-solving, with cost/latency guardrails and a mix of exact-match and LLM-rubric grading. Use when comparing two LLMs on reasoning/riddle tasks or as a template for promptfoo evals combining cost/latency thresholds with content and rubric assertions.
What it does
This is a promptfoo evaluation configuration that benchmarks two language models against a battery of riddles, despite its title naming GPT-4o and GPT-4o Mini - the actual providers list in the config specifies openai:gpt-5 and openai:gpt-5-mini, a title/config mismatch preserved here as-is rather than silently corrected. It runs a single prompt template ("Solve this riddle: {{riddle}}") across fourteen riddle variations, applying a defaultTest assertion block to every case: cost must stay under $0.002 per inference and latency under 3000ms, functioning as guardrails on operational cost and speed alongside accuracy.
Several riddles carry specific per-test assertions beyond the defaults: a "speak without a mouth" riddle requires the output to contain the word "echo" and, via an llm-rubric model-graded assertion, requires the model not to apologize; a boat riddle requires the rubric to confirm the answer explains that everyone aboard is married (so no "single" people); a darkness riddle requires the literal word "darkness" in the output. The remaining ten riddles - keys-without-locks, growing-without-lungs, "travels around the world in a corner," "heavy forward, light backward," and others including a "Snap, Crackle, and ___" pop-culture riddle - have no per-test assertions beyond the cost/latency defaults, relying on manual or comparative review of the two models' answers rather than automated correctness grading.
When to use - and when NOT to
Use this configuration when comparing two language models' performance on riddle-solving and reasoning tasks, or as a template for building similar promptfoo comparisons with cost/latency thresholds and a mix of exact-match, contains, and LLM-rubric assertions.
It is not a general-purpose benchmark suite - it's scoped narrowly to riddle-solving with a specific pair of models configured (currently GPT-5 and GPT-5 Mini despite the title), and its default cost/latency thresholds are tuned for that specific model pairing rather than universal.
Inputs and outputs
Input is a set of riddle strings substituted into the shared prompt template, run against both configured providers. Output is promptfoo's standard evaluation report comparing each model's answers per riddle, pass/fail status against the cost/latency thresholds and any per-test content/rubric assertions, and a side-by-side view for the riddles without automated grading.
providers:
- openai:gpt-5
- openai:gpt-5-mini
Integrations
Built on the promptfoo evaluation framework's YAML config schema, using its cost, latency, contains, and llm-rubric assertion types, and targeting OpenAI's API for both compared models.
Who it's for
Developers or teams evaluating LLM reasoning and riddle-solving performance plus cost/latency tradeoffs between two models, using promptfoo as the evaluation harness.
Source README
yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
description: Comparing GPT-4o and GPT-4o Mini performance on riddles
prompts:
- 'Solve this riddle: {{riddle}}'
providers:
- openai:gpt-5
- openai:gpt-5-mini
defaultTest:
assert:
# Inference should always cost less than this (USD)
- type: cost
threshold: 0.002
# Inference should always be faster than this (milliseconds)
- type: latency
threshold: 3000
tests:
- vars:
riddle: 'I speak without a mouth and hear without ears. I have no body, but I come alive with wind. What am I?'
assert:Make sure the LLM output contains this word
- type: contains
value: echo
Use model-graded assertions to enforce free-form instructions
- type: llm-rubric
value: Do not apologize
- type: contains
- vars:
riddle: "You see a boat filled with people. It has not sunk, but when you look again you don't see a single person on the boat. Why?"
assert:- type: llm-rubric
value: explains that there are no single people (they are all married)
- type: llm-rubric
- vars:
riddle: 'The more of this there is, the less you see. What is it?'
assert:- type: contains
value: darkness
- type: contains
- vars:
riddle: >-
I have keys but no locks. I have space but no room. You can enter, but
can't go outside. What am I? - vars:
riddle: >-
I am not alive, but I grow; I don't have lungs, but I need air; I don't
have a mouth, but water kills me. What am I? - vars:
riddle: What can travel around the world while staying in a corner? - vars:
riddle: Forward I am heavy, but backward I am not. What am I? - vars:
riddle: >-
The person who makes it, sells it. The person who buys it, never uses
it. The person who uses it, doesn't know they're using it. What is it? - vars:
riddle: I can be cracked, made, told, and played. What am I? - vars:
riddle: What has keys but can't open locks? - vars:
riddle: >-
I'm light as a feather, yet the strongest person can't hold me for much
more than a minute. What am I? - vars:
riddle: >-
I can fly without wings, I can cry without eyes. Whenever I go, darkness
follows me. What am I? - vars:
riddle: >-
I am taken from a mine, and shut up in a wooden case, from which I am
never released, and yet I am used by almost every person. What am I? - vars:
riddle: >-
David's father has three sons: Snap, Crackle, and _____? What is the
name of the third son? - vars:
riddle: >-
I am light as a feather, but even the world's strongest man couldn't
hold me for much longer than a minute. What am I?
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.