Are you sure you want to delete this access key?
This directory contains example configurations for testing different Google Vertex AI models using promptfoo. The examples demonstrate various features and capabilities of Vertex AI models.
promptfooconfig.gemini.yaml
: Examples using Gemini 2.0 models
promptfooconfig.claude.yaml
: Examples using Claude models
promptfooconfig.llama.yaml
: Examples using Llama models
promptfooconfig.search.yaml
: Examples using Search grounding
Install the Google Auth Library:
npm install google-auth-library
Enable the Vertex AI API in your Google Cloud project:
Configure authentication:
# Option 1: User Account (recommended for development)
gcloud auth application-default login
# Option 2: Service Account
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json
Set your Google Cloud project:
gcloud config set project YOUR_PROJECT_ID
Run specific model tests:
# Test Gemini models
promptfoo eval -c promptfooconfig.gemini.yaml
# Test Claude models
promptfoo eval -c promptfooconfig.claude.yaml
# Test Llama models
promptfoo eval -c promptfooconfig.llama.yaml
# Test Search grounding
promptfoo eval -c promptfooconfig.search.yaml
View results:
promptfoo view
The search grounding feature allows Gemini models on Vertex AI to access up-to-date information from the web, making responses more accurate for:
You can enable Search grounding using this format:
# Object format (matches Google's API)
tools:
- googleSearch: {}
When using Search grounding, the response includes metadata with:
groundingMetadata
- Information about search resultsgroundingChunks
- Web sources usedwebSearchQueries
- Queries the model usedsearchEntryPoint
- HTML for displaying Google Search SuggestionsNote: Google requires applications to display Search Suggestions when using search grounding in user-facing applications.
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?