Comparing GPT, Claude and Gemini on your own data with promptfoo
Public benchmarks and vendor demos rarely tell you how GPT, Claude or Gemini will perform on your invoices, support tickets or contract clauses. With promptfoo, you can run one evaluation suite across several hosted models against your own cases, so the comparison reflects the task you actually need done. promptfoo is an open-source tool, licensed under the MIT license, and according to its documentation the software runs completely locally: evals execute on your machine and talk directly with each model provider, so your test data is not routed through a promptfoo service. The comparison covers quality, cost and latency side by side, which is the combination that matters when a model choice changes what you pay per request and how long users wait.
The comparison is worth running in two situations: before you pick a hosted model for a new feature, and before you switch models on an existing one, whether the trigger is a price change, a new release from a vendor or a request to reduce latency. Start with a representative set of cases drawn from production or realistic samples, and agree on what a good answer looks like before you see any outputs. The promptfoo documentation includes a guide to comparing GPT, Claude and Gemini side by side on your own data for cost, latency and quality, which is a useful starting point for the setup. Confirm current model names, provider credentials and pricing with each vendor, since these change often and affect the cost column directly.
The Community edition of promptfoo is free and includes all LLM evaluation features and all model providers and integrations, according to the promptfoo pricing page. That means a team can run the full multi-model comparison described here without a paid license, and the MIT license covers the open-source code itself. Paid tiers add team sharing, access control and SSO for shared results, which matters later if several reviewers need to sign off on a model choice, but they are not required to run the comparison. Before you start, ask who will own the suite, where the results will be stored and who approves the chosen model, because those decisions determine whether the comparison becomes a repeatable check or a one-time spreadsheet.
Which comparison setup fits which decision
This table compares four ways to run a model comparison in promptfoo, from a same-prompt run to a run that measures cost and latency next to quality. Read each row for when the setup fits, what it actually measures, and what it can hide, then pick the setup that matches the decision you need to make.
| Setup | When it fits | What it measures | What it can hide |
|---|---|---|---|
| Same prompt across hosted models | A first look at whether a model can handle the task at all, with no prompt work yet | Raw output quality on one shared prompt and test set | Models that would do well with a prompt written for them may look weak, so the ranking reflects the prompt more than the model |
| Per-provider prompt variants | Choosing a model for production, where each vendor is given a fair prompt for its own behavior | Best achievable quality for each model after reasonable tuning of its prompt | Extra effort spent on one model's prompt can inflate its score, so record every variant and apply the same tuning budget to each |
| Quality, cost and latency together | A procurement or architecture decision where price per request and response time matter alongside quality | Score per dollar and time per response next to pass rates on your own test cases | Prices and latency change over time and depend on region, load and token counts, so confirm current rates with each vendor and rerun before deciding |
| Repeated runs on a sample of real traffic | Confirming a shortlist before rollout, using representative inputs from your own users or documents | Consistency across varied inputs, edge cases and failure modes that a small hand-written set misses | Small or unrepresentative datasets can favor one model, and a single run hides variance, so repeat runs and check the sample covers your real workload |
Set up a fair three-model comparison
This sequence takes a team from a clean machine to a single promptfoo eval that runs GPT, Claude and Gemini against the same task, with the same prompt, cases and grading. The result is a side-by-side table of quality, cost and latency that the team can rerun and defend.
Check the Node.js runtime
Confirm that Node.js 22.22.0 or newer is installed on the machine or CI runner that will run the eval, since the promptfoo npm release requires that version or later. Run
node --versionand compare the output with the requirement. Done means the version prints at or above 22.22.0 and the same version is recorded in your team's setup notes so later runs are reproducible.Install promptfoo and confirm the CLI
Install the promptfoo package from npm, either globally or as a project dependency, so every team member runs the same version. Then run
promptfoo --versionto confirm the CLI responds. Pin the version you installed in your project, because promptfoo changes between releases and an unpinned install can change results between runs. Done means the CLI reports a version and the lockfile or setup notes record it.Write one config with three providers
Create a
promptfooconfig.yamlthat lists the GPT, Claude and Gemini models as providers and sets an API key environment variable for each vendor. Use one shared prompt and keep provider-specific settings such as temperature, max tokens and system messages identical unless a documented difference is required for the task. Confirm the exact model identifiers and provider names in the promptfoo provider documentation and in your vendor's current model list. Done means the file validates and each provider appears when the config is loaded.Build the task dataset
Assemble test cases from your own inputs, using real examples from the task with expected answers or reference material where you have them. Include routine cases, hard edge cases and cases that previously failed. Keep the dataset in a file the whole team can review, such as a CSV, and reference it from the config. Done means a dry run loads every case and the count matches the number you intended to test.
Choose assertions for the task
Add deterministic assertions such as equals, contains, regex or is-json wherever the expected output is objective, and reserve model-graded assertions such as llm-rubric for qualities that cannot be checked by rule. Use the same assertions for all three providers so the scores are comparable. Document the grader model you use and keep it separate from the three models under test where possible. Done means each case has at least one assertion and the assertion set is recorded alongside the config.
Run the eval across all providers
Run
promptfoo evalfrom the project directory so that every case executes against GPT, Claude and Gemini with the same configuration. Watch the run for provider errors, rate limit messages and skipped cases, since a failed call counts as missing data rather than a weak answer. Done means the run finishes with a result for every case and provider, or with failures you have logged and can explain.Confirm each provider returned output
Open the results with
promptfoo viewor the exported report and check that every provider has an output for every case. Confirm that the cost and latency columns are populated for each provider, because blank cost or latency values usually mean a pricing or token count gap that must be fixed before the numbers are compared. Done means no provider column is empty and the cost and latency figures are present for all rows.Review results and check for prompt bias
Compare pass rates, cost and latency side by side, then read the failing outputs for each model to see whether a failure comes from the model or from a prompt written with one vendor's habits in mind. If one model fails mainly on formatting, adjust the shared prompt for all three and rerun before drawing conclusions. Record the config, dataset and run date so the comparison can be repeated. Done means you have a written summary tied to a specific eval run. For method details, see the promptfoo guide to comparing GPT, Claude and Gemini.
Where unfair comparisons come from
A comparison across GPT, Claude and Gemini is only as fair as the setup behind it. The sources below are the ones that most often tilt results, and each can be controlled inside a single promptfoo suite before anyone reads the scores.
Prompts tuned for one model
A prompt written and refined while testing one provider often reflects that model's habits, such as how it follows instructions or formats answers. The other models then look worse for reasons unrelated to capability. Keep one neutral prompt in the suite, and if you test per-model prompt variants, list each one as a separate provider with its own label so the trade-off is visible. Check that each model's score was produced by the same prompt wording.
Different system prompts and formatting
Providers handle system messages, role names and message structure differently, so the same instructions can reach each model in a different form. Output formatting such as Markdown, JSON wrapping or verbosity can also drift between providers. Define the message structure once in the config and review the rendered prompt for each provider in the output before trusting results.
Mismatched temperature and token limits
Sampling settings such as temperature, top-p and maximum output tokens change answer quality and length. If one model runs with a higher temperature or a tighter token cap, the comparison measures the settings rather than the model. Put the same generation parameters in the provider configuration for every model, and where a provider does not support a setting, record that difference in the report so readers can judge it.
Unequal sample sizes and repeats
A model tested on 20 cases and another on 200 cannot be ranked fairly, and single runs of a sampled model can swing from one execution to the next. Use the same test cases for every provider, and repeat runs where outputs vary enough to matter. Confirm the case count and repeat count match across providers before comparing pass rates or averages.
Judge models that favor one family
When an LLM grader scores outputs, it may prefer answers written in its own style or from its own model family. A judge drawn from one of the compared providers can therefore tilt the ranking. Choose a judge outside the set under comparison, or use deterministic assertions wherever the task allows, and spot-check a sample of judge decisions by hand to confirm the grader agrees with a human reviewer on every model.
Stale or contaminated test data
Test cases drawn from public benchmarks or sources that models may have seen during training can reward memorization rather than the task. Test data that predates recent changes in your own documents or policies also tests the wrong thing. Build the cases from your own recent material, keep a held-out set that no one tuned against, and record the date each case was written so the suite can be refreshed on a schedule.
Measuring cost and latency without guessing
Cost and latency have to be measured on your own traffic, not estimated from list prices. A published price per million tokens says little until you know how many input tokens your prompts carry, how long the outputs run for your task, and how often a request is retried. Two models with similar list prices can differ several times in cost per completed task once a long system prompt, a retrieved context block or verbose answers are included. Run the same promptfoo suite across GPT, Claude and Gemini with your real test cases, then read token counts and latency from the results rather than from the pricing pages. Keep a record of the date and the price sheet you used, because provider pricing and model names change, and a comparison run last quarter may no longer reflect what you would pay today.
Several drivers move the result, and each one should be set deliberately before you compare numbers. Input length is driven by the prompt template, few-shot examples and any inlined source material, so a prompt that is fair for one model may be padded for another. Output length depends on instructions and on the model's default verbosity, and output tokens are often billed at a higher rate than input tokens. Retries from rate limits or malformed outputs add cost and latency that never appears in a single-call estimate. Concurrency settings and caching change wall-clock time for a full suite run, but they do not change per-request latency a user experiences, so keep those two measures separate in your report.
Before you rely on any figure, confirm it with each vendor. Check the current input and output prices for the exact model versions you test, any batch or volume discounts, the rate limits on your account tier, and whether cached input tokens are billed differently. Ask your account contact or read the provider's own pricing and limits documentation, and record what you found alongside the run. Treat latency as a measurement you take yourself, from the region and network path your application uses, at the concurrency you expect in production. If a vendor's published limits do not match what your account allows, the account limits are the ones that matter for your budget and schedule.
How the comparison run flows from suite to decision
The run starts with one promptfoo config on the team's machine, which holds the shared test cases and assertions. promptfoo sends the same cases to each provider, so GPT, Claude and Gemini are scored on identical inputs. Assertions and an optional judge model grade each output, and the results report quality, cost and latency side by side. A human reviewer checks the failing cases and the grader's calls before any model is chosen, and confirms that prompts were not tuned for one provider.
One suite feeds three providers, and a person reviews the results before deciding.
Handling data, keys and results in a model comparison
A comparison suite touches three things that need owners before the first run: the machine that runs the evals, the provider accounts that hold the keys, and the test data that leaves your environment for each vendor. The cards below cover each one, plus where results end up and what the Community edition does not provide.
Local runs and what stays on your machine
promptfoo's documentation states that evals run completely locally, with the tool talking directly to each LLM. For a GPT, Claude and Gemini comparison, that means the suite, results and grading logic stay on the machine or CI runner that executes them, while prompts and outputs go straight to each provider. Confirm which host runs the comparison, who can read its working directory, and whether any traces or cached responses are written there.
promptfoo introductionWhere provider API keys live
Each hosted model needs its own API key, and a three-provider suite means three secrets with different owners, scopes and rotation rules. Keep them in your secrets manager or CI secret store, not in the config file committed to the repository. Create separate keys per comparison project so you can revoke one without breaking the others, and set spending limits on each account before the first run.
Test data sent to each provider
Every test case, system prompt and document in the suite goes to every provider in the comparison, so a single dataset can reach three vendors. Before running, classify the data: synthetic or anonymized cases can usually go anywhere, while customer records, health or financial data may not be permitted at all. Confirm with your data protection or compliance owner that each provider and region is approved for that class of data.
Vendor data terms to review
Retention, training use, abuse-monitoring logs, sub-processors and data residency differ between OpenAI, Anthropic and Google, and they also differ by product tier and by the account type used for the API. Read each vendor's current data terms and record the version you relied on. Ask whether the account you hold is covered by zero-retention or enterprise terms, and do not assume that a consumer subscription carries the same protections.
Storing and sharing results
Results are written to a local output file or database by default, and they contain model outputs that may echo sensitive test data. Decide where result files are kept, how long they live, and who may open them. The self-hosted promptfoo server stores data in a local SQLite database that cannot be shared across replicas, has no RBAC and no built-in authentication or SSO, and is not recommended for production use.
Self-hosting docsWhat Community edition leaves out
The free Community edition includes all LLM evaluation features and all model providers, but it does not add team sharing, teams-based access control or SSO. If several people need to review comparison results together under access controls, plan for the Enterprise tier or a separately governed storage location. Ask promptfoo for current edition terms before you rely on any of these capabilities.
promptfoo pricingWhat teams ask before comparing models with promptfoo
How much effort does a model comparison with promptfoo take?
Effort depends mostly on the quality of your test cases, not on the tool. A comparison needs a representative dataset, a single prompt template that every model receives, assertions that reflect what good output means for your task, and a person to read the results. Each added provider multiplies the number of calls and the number of outputs someone may need to review, so the scope should state how many models are in play from the start. Cost and latency are measured on the same runs, so the work of collecting them is small once the suite exists. The largest recurring cost is usually reviewer time when grading is subjective. Ask for a written estimate that lists the dataset size, provider count, assertion types and the review method, because each of these changes the total effort directly.
Can our team run a model comparison ourselves with the free edition?
Yes, if your team has engineers who can write a configuration file and run a command-line tool. promptfoo is licensed under the MIT license, and its Community edition is free and includes all LLM evaluation features and all model providers and integrations. Evals run on your machine and talk directly with each model, so your test data does not pass through a promptfoo-hosted service during evaluation. The guide published by promptfoo walks through comparing GPT, Claude and Gemini side by side on cost, latency and quality. What a self-run project lacks is shared review, team access control and a dashboard for many people, which are part of the paid Enterprise tier. Teams often start alone and bring in outside help only when the comparison becomes a formal decision.
How long does the first useful comparison result take?
The first result arrives quickly when you already have labeled examples, and slowly when you must create them. If your team has a set of real inputs with known good answers, a first suite can run within a short working session, and the first useful output is a table of scores, costs and latency per model. If you have no reference answers, most of the time goes to writing expected behavior and rubrics, and reviewing disagreements between graders. No duration figure is supplied for this work, so ask any provider to state the milestones in writing: dataset agreed, suite running, first table reviewed, and decision recorded. Those milestones tell you more than a single number.
What do we need to provide for a model comparison?
The work needs four things from your side. First, API access for every hosted model in scope, with billing set up and rate limits known, since these determine how long runs take. Second, representative cases drawn from production or realistic usage, including edge cases and failure cases that matter to your business. Third, a named decision owner who can accept or reject the findings and say which trade-offs are acceptable. Fourth, reviewers with domain knowledge who can judge outputs or confirm grader decisions. Without the decision owner, comparisons tend to end with a table that nobody acts on. Confirm with your security team how API keys and test data will be stored, because the prompts and datasets will be sent to third-party model providers.
Why do results from one model suite differ from another?
Results are often unfair because the prompt was tuned for one model. A system prompt, few-shot examples or output format that suits one model can disadvantage another, so the comparison measures prompt fit instead of model quality. A fair setup uses the same task description, the same examples and the same output constraints for each model, then records any adjustments as part of the test design. Also check that default parameters such as temperature and maximum output length are set deliberately rather than left to differ silently between providers. Document each choice in the configuration so a reviewer can rerun the comparison and see exactly what each model received.
How should we interpret cost and latency numbers across providers?
Treat cost and latency as measurements from your own runs, not as published rates. Pricing and performance vary by model, region, load and time, so the figures reflect the conditions of the test day. Compare cost per completed task rather than cost per call, because a cheaper model that needs retries or longer prompts can cost more overall. Run enough cases that outliers do not dominate the average, and report percentiles alongside means. Confirm current prices with each provider before you finalize a decision, since pricing changes over time and a comparison from one month may not hold later.
When is it worth bringing in a partner for a model comparison?
Bring in a partner when the decision carries material risk, when no one on your team has time to own the suite, or when the comparison must become repeatable evidence for governance. DeployOpen implements, customizes and supports self-hosted open-source platforms in your own infrastructure, and it plans and runs security testing, including AI and agent security reviews. A fixed-scope engagement is agreed in writing before work starts, so you know the deliverables and can compare the quote with doing the work internally. For a one-off comparison with a clear dataset, many teams can do it alone. Ask any partner to show how the suite will be handed over, so your team can rerun it after the engagement ends.
Does the comparison need to meet any compliance requirements?
A model comparison itself rarely needs a compliance certification, but the data and records it produces can matter to auditors and to internal risk reviews. Prompts and test cases may contain personal or regulated data, so decide before testing which data may be sent to each provider and under what contract terms. Keep the configuration, dataset version and results together so a decision can be traced later. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports or certifications, and independent auditors or certification bodies perform those assessments. Confirm the requirements with your compliance lead before the dataset is built.
How DeployOpen scopes and delivers model comparisons
DeployOpen treats a three-model comparison as a small engineering project with a written scope, a fixed set of task-specific test cases and a handover your team can rerun. We build the promptfoo suite inside your own infrastructure so the evaluation data, API keys and results stay under your control.
How we scope
- Agree the task, the candidate models and the success criteria in writing before any build starts.
- Define which of your real documents, tickets or records may be used as test inputs and how they are handled.
- Set one shared prompt baseline and the rules for any per-model prompt changes, so the comparison stays fair.
- Confirm which cost, latency and quality measures matter to your team and how each will be recorded.
How we build
- Configure one promptfoo suite that sends identical test cases to GPT, Claude and Gemini through their providers.
- Choose deterministic assertions where they fit and add model-graded rubrics only where a rule cannot check the answer.
- Record token usage, latency and cost per model so the comparison covers all three measures from the same run.
- Test the suite itself with known good and known bad outputs so the graders are shown to separate them.
How we hand over
- Deliver the promptfoo configuration, test datasets and grader definitions as versioned files in your repository.
- Document how to rerun the comparison, how to add a new model and how to read the results table.
- Provide a findings report that states the results, the limits of the test data and the open questions for your team.
- Walk your engineers through the suite so they can rerun it after a provider model update without us.
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
- Ask in the quote which provider accounts, API limits and infrastructure your team will provide and who pays for model usage.
- Ongoing support, upgrades and repeat comparisons when providers release new models are available as a retainer.
- Confirm with your team how often the comparison should be rerun and who owns the decision to change a production model.

