Compare GPT Model Performance
Promptfoo workflow that benchmarks gpt-5.4, gpt-5.4-mini, and gpt-5.4-nano side-by-side on identical prompts to compare quality, latency, and cost across
Why it matters
Evaluate and compare the performance of different GPT model tiers for your specific use cases. This asset helps you understand which model offers the best balance of cost and capability for your coding tasks.
Outcomes
What it gets done
Run benchmark tests across various GPT models.
Analyze and summarize model performance metrics.
Generate code snippets to facilitate testing.
Identify the most cost-effective model for your needs.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/pfoo-compare-gpt-model-tiers | bash Overview
Compare Gpt Model Tiers
This prompt chain compares three OpenAI GPT model tiers (gpt-5.4, gpt-5.4-mini, and gpt-5.4-nano) by running identical prompts across all three and measuring quality, latency, and cost. Use this workflow when you need to decide which GPT model tier fits your application's requirements, especially when balancing response quality against speed and API costs.
What it does
This prompt chain compares three OpenAI GPT model tiers (gpt-5.4, gpt-5.4-mini, and gpt-5.4-nano) by running identical prompts across all three and measuring quality, latency, and cost. It uses promptfoo's evaluation framework with latency assertions to provide accurate timing data for model performance comparisons.
When to use - and when NOT to
Use this workflow when you need to decide which GPT model tier fits your application's requirements, especially when balancing response quality against speed and API costs. It's ideal when prototyping a new feature and you're unsure whether the full model's capabilities justify the expense, or when optimizing an existing system to reduce latency or costs without sacrificing output quality.
Do NOT use this if you need cached results for comparison - the latency assertion requires running with --no-cache to get accurate timing measurements, so repeated evaluations will consume API credits. Avoid this approach if you're comparing models outside the gpt-5.4 family, as the example is specifically configured for these three tiers.
Inputs and outputs
You provide your OpenAI API key as an environment variable (OPENAI_API_KEY) and the same set of prompts that will be evaluated across all three model tiers. The workflow outputs comparative metrics for quality, latency, and cost across gpt-5.4, gpt-5.4-mini, and gpt-5.4-nano, allowing you to make data-driven decisions about which model tier to deploy.
Integrations
This workflow integrates with:
- OpenAI API: Connects to gpt-5.4, gpt-5.4-mini, and gpt-5.4-nano models for evaluation
- promptfoo: Uses the promptfoo evaluation framework for running comparisons and latency assertions
To get started, run:
npx promptfoo@latest init --example compare-gpt-model-tiers
cd compare-gpt-model-tiers
Then set your OPENAI_API_KEY environment variable and execute npx promptfoo@latest eval to run the comparison.
Who it's for
This workflow is built for ML engineers and product teams evaluating which OpenAI model tier to use in production. It's particularly valuable for developers building cost-sensitive applications who need quantitative data to justify model selection, and for engineering managers who need to demonstrate the trade-offs between model performance and infrastructure costs to stakeholders.
Source README
compare-gpt-model-tiers (Comparing GPT Model Tiers)
You can run this example with:
npx promptfoo@latest init --example compare-gpt-model-tiers
cd compare-gpt-model-tiers
Usage
Set your OPENAI_API_KEY environment variable, then run npx promptfoo@latest eval.
This example compares gpt-5.4, gpt-5.4-mini, and gpt-5.4-nano on the same prompts so you can compare quality, latency, and cost across model tiers.
Note: this example uses a latency assertion, so use --no-cache to get accurate timing results.
FAQ
Common questions
Discussion
Questions & comments ยท 0
Sign In Sign in to leave a comment.