Are you sure you want to delete this access key?
This example demonstrates Mistral AI's chat models, including their new Magistral reasoning models, traditional chat models, and shows how to use Mistral models for evaluation grading and embeddings.
You can run this example with:
npx promptfoo@latest init --example mistral
This example requires:
MISTRAL_API_KEY
- Your Mistral API key (get it from console.mistral.ai)magistral-medium-latest
): Enterprise reasoning model ($2/$5 per M tokens)magistral-small-latest
): Open-source reasoning model ($0.5/$1.5 per M tokens)mistral-large-latest
): Top-tier model for complex tasksmistral-medium-latest
): Balanced performance and costmistral-small-latest
): Efficient for simple tasksmistral-large-latest
for LLM-as-a-judge evaluationmistral-embed
for semantic similarity checks# Set your API key
export MISTRAL_API_KEY=your_api_key_here
# Run the evaluation
promptfoo eval
# View results in the web UI
promptfoo view
This example showcases several advanced promptfoo features:
The evaluation uses Mistral models end-to-end, providing a comprehensive view of their ecosystem capabilities.
This example includes multiple configuration files for different use cases:
promptfooconfig.aime2024.yaml
- Advanced mathematical competition problems (AIME2024 dataset)promptfooconfig.reasoning.yaml
- Step-by-step logical problem solvingpromptfooconfig.comparison.yaml
- Compare reasoning across all Mistral modelspromptfooconfig.code-generation.yaml
- Multi-language programming with Codestralpromptfooconfig.multimodal.yaml
- Vision and text processing with Pixtralpromptfooconfig.tool-use.yaml
- Function calling and tool integrationpromptfooconfig.json-mode.yaml
- Structured JSON output generationpromptfooconfig.yaml
- Main example with evaluation using Mistral modelsRun any specific configuration:
npx promptfoo@latest eval -c promptfooconfig.aime2024.yaml # Mathematical reasoning
npx promptfoo@latest eval -c promptfooconfig.comparison.yaml # Model comparison
Press p or to see the previous file or, n or to see the next file
Browsing data directories saved to S3 is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with AWS S3!
Are you sure you want to delete this access key?
Browsing data directories saved to Google Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with Google Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to Azure Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with Azure Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to S3 compatible storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with your S3 compatible storage!
Are you sure you want to delete this access key?