Integrate Claude with Azure AI Foundry
A Promptfoo example evaluating Claude Opus, Sonnet, and Haiku models deployed on Azure AI Foundry on explanation tasks.
0.121.19Add to Favorites
Why it matters
Leverage Anthropic's Claude models within Azure AI Foundry for advanced natural language processing tasks. This integration enables sophisticated content generation, summarization, and conversational AI capabilities.
Outcomes
What it gets done
Connect Claude models to Azure AI Foundry.
Utilize Claude for text summarization.
Implement Claude for content generation.
Build conversational AI applications on Azure.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/pfoo-claude | bash Steps
Steps in the chain
Overview
Claude
A Promptfoo example comparing Claude Opus 4.6, Sonnet 4.6, and Haiku 4.5 models deployed on Azure AI Foundry on explanation tasks. Use it to evaluate Claude models specifically through Azure AI Foundry rather than Anthropic's own API. Requires models already deployed in Azure AI Foundry.
What it does
A Promptfoo example that runs Claude models hosted on Azure AI Foundry, comparing Claude Opus 4.6, Claude Sonnet 4.6, and Claude Haiku 4.5 on explanation tasks.
When to use - and when NOT to
Use it as a starting point when you want to evaluate Anthropic's Claude models specifically through Azure AI Foundry - rather than Anthropic's own API - for example benchmarking Opus 4.6 against Sonnet 4.6 and Haiku 4.5 on the same explanation tasks. It requires Claude models already deployed in Azure AI Foundry, with AZURE_API_KEY and AZURE_API_HOST environment variables set, before running.
Inputs and outputs
Set up with:
npx promptfoo@latest init --example azure/claude
cd azure/claude
export AZURE_API_KEY=your-api-key
export AZURE_API_HOST=your-deployment.services.ai.azure.com
npx promptfoo@latest eval
npx promptfoo@latest view
The example config compares three named models - claude-opus-4-6-20260205, claude-sonnet-4-6, and claude-haiku-4-5-20251001 - editable in promptfooconfig.yaml to change provider IDs, adjust temperature/max_tokens, or add more test cases.
Integrations
Integrates with Azure AI Foundry's Claude model deployments via Promptfoo's Azure provider.
Who it's for
Teams evaluating Claude models deployed through Azure AI Foundry who want a ready-made Promptfoo comparison across Opus, Sonnet, and Haiku tiers rather than writing eval config from scratch.
Source README
azure/claude (Azure Claude Models)
This example demonstrates how to use Anthropic Claude models on Azure AI Foundry with promptfoo.
You can run this example with:
npx promptfoo@latest init --example azure/claude
cd azure/claude
Setup
- Deploy Claude models in Azure AI Foundry
- Set your environment variables:
export AZURE_API_KEY=your-api-key
export AZURE_API_HOST=your-deployment.services.ai.azure.com
Available Claude Models
| Model | Description |
|---|---|
claude-opus-4-6-20260205 |
Claude Opus 4.6 - Most capable |
claude-sonnet-4-6 |
Claude Sonnet 4.6 - Balanced |
claude-haiku-4-5-20251001 |
Claude Haiku 4.5 - Fast |
Running the Example
npx promptfoo@latest eval
npx promptfoo@latest view
Configuration
The example compares Claude Opus 4.6, Claude Sonnet 4.6, and Claude Haiku 4.5 on explanation tasks. Modify promptfooconfig.yaml to:
- Change models by updating the provider IDs
- Adjust temperature and max_tokens
- Add more test cases
Documentation
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.