Compare AI Models Across Providers
Promptfoo example comparing GPT-5.1, Claude Sonnet, Llama 4, and Mistral Large side-by-side on Azure AI Foundry for model benchmarking.
Why it matters
Evaluate and compare the performance of leading AI models from various providers on Azure AI Foundry. Understand which models excel for different tasks and make informed decisions for your AI deployments.
Outcomes
What it gets done
Benchmark OpenAI, Anthropic Claude, Meta Llama, and Mistral models.
Analyze model outputs for consistency and quality.
Identify optimal models for specific use cases.
Facilitate multi-provider AI model selection.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/pfoo-comparison | bash Steps
Steps in the chain
Overview
Comparison
This promptfoo example compares OpenAI, Anthropic, Meta, and Mistral models deployed on Azure AI Foundry, running identical test questions against all four and scoring the results. Use it once multiple provider models are already deployed in the same Azure AI Foundry project and you need a direct quality/cost comparison before choosing one.
What it does
This promptfoo example benchmarks four models hosted on Azure AI Foundry side-by-side: OpenAI gpt-5.1, Anthropic claude-sonnet-4-6, Meta Llama-4-Maverick-17B-128E-Instruct-FP8, and Mistral Mistral-Large-2411. Running npx promptfoo@latest eval sends the same test questions to all four deployments and scores their responses, letting you compare quality, cost, and behavior across providers without writing custom evaluation code.
When to use - and when NOT to
Use it when you have already deployed multiple provider models in the same Azure AI Foundry project and want a direct, apples-to-apples comparison on your own tasks - benchmarking accuracy, evaluating cost-effectiveness, choosing a model for a project, or A/B testing after a model update. Do not use it if you have not yet deployed the models in Azure AI Foundry, since each provider's deployment and endpoint must exist and be configured with its own apiHost in promptfooconfig.yaml before the comparison can run.
Inputs and outputs
Setup requires the AZURE_API_KEY environment variable plus a per-provider apiHost entry in promptfooconfig.yaml pointing at each model's deployment. Inputs are the test questions defined in the config; outputs are graded evaluation results viewable via npx promptfoo@latest view, covering response quality alongside cost and performance metrics across the four models.
Integrations
Runs through the promptfoo CLI (npx promptfoo@latest init --example azure/comparison) against Azure AI Foundry deployments of OpenAI, Anthropic, Meta, and Mistral models. Configuration is entirely promptfooconfig.yaml-driven - add or remove models, change test questions, or adjust evaluation criteria by editing that file rather than the eval harness itself.
Who it's for
Teams evaluating which model to standardize on for a project, or engineers who need a repeatable way to re-benchmark model choices whenever Azure AI Foundry adds a new deployment or a provider ships a model update.
Source README
azure/comparison (Azure Model Comparison)
This example demonstrates how to compare models from different providers on Azure AI Foundry, including OpenAI, Anthropic Claude, Meta Llama, and Mistral.
You can run this example with:
npx promptfoo@latest init --example azure/comparison
cd azure/comparison
Setup
- Deploy models from different providers in Azure AI Foundry
- Set your environment variables:
export AZURE_API_KEY=your-api-key
### Set apiHost in promptfooconfig.yaml for each provider's deployment
Models Compared
| Provider | Model | Label |
|---|---|---|
| OpenAI | gpt-5.1 |
gpt-5.1 |
| Anthropic | claude-sonnet-4-6 |
claude-sonnet |
| Meta | Llama-4-Maverick-17B-128E-Instruct-FP8 |
llama-4 |
| Mistral | Mistral-Large-2411 |
mistral-large |
Running the Example
npx promptfoo@latest eval
npx promptfoo@latest view
Customization
Modify promptfooconfig.yaml to:
- Add or remove models
- Change test questions
- Adjust evaluation criteria
- Compare cost vs performance
Use Cases
- Benchmark different models on your specific tasks
- Evaluate cost-effectiveness across providers
- Find the best model for your use case
- A/B test model updates
Documentation
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.