Integrate Claude with Azure AI Foundry
Example configuration demonstrating how to test Anthropic Claude models deployed on Azure AI Foundry using the promptfoo evaluation framework.
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 Capabilities
What this chain does
Handles multi-turn conversations within a defined domain.
Condenses long documents or threads into key takeaways.
Pulls structured data fields from unstructured text.
Overview
Claude
What it does
This is a configuration example that demonstrates the integration between promptfoo and Anthropic Claude models deployed on Azure AI Foundry. It shows the specific setup required to evaluate Claude models through Azure's AI platform rather than Anthropic's native API.
How it connects
Use this example when you need to test or evaluate Claude models that are hosted on Azure AI Foundry. It is particularly relevant for teams already using Azure infrastructure who want to incorporate Claude model testing into their existing Azure-based workflows.
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
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.