Are you sure you want to delete this access key?
You can run this example with:
npx promptfoo@latest init --example google-aistudio-gemini
This example demonstrates using Google's Gemini models with promptfoo to evaluate math puzzle solving capabilities.
npm install -g promptfoo
or brew install promptfoo
)GOOGLE_API_KEY
The example tests across multiple Gemini models:
This example also demonstrates how to load system instructions from an external file using the file://
prefix:
providers:
- id: google:gemini-2.5-pro
label: gemini-with-system-instruction-file
config:
systemInstruction: file://system-instruction.txt
The system-instruction.txt
file contains reusable instructions that can be:
This example also includes an image understanding configuration (promptfooconfig.image.yaml
) that demonstrates:
file://
prefixImages should be placed on separate lines in the prompt. The file://
prefix automatically handles loading and encoding the images for the Gemini API.
promptfoo init --example google-aistudio-gemini
# Basic math puzzle evaluation across multiple Gemini models
promptfoo eval
# Image understanding and comparison evaluation
promptfoo eval -c promptfooconfig.image.yaml
promptfoo view
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?