Compare IBM WatsonX Models for Code Generation Tasks
Compares IBM Granite, Meta Llama, and Mistral models available through IBM watsonx.ai in promptfoo.
Maintainer of this project? Claim this page to edit the listing.
0.121.18Add to Favorites
Why it matters
Evaluate and benchmark multiple large language models (IBM Granite, Meta Llama, Mistral) available through IBM watsonx.ai to determine which performs best for your specific use case, enabling data-driven model selection decisions.
Outcomes
What it gets done
Configure authentication with IBM Cloud API keys or bearer tokens
Run comparative evaluations across IBM Granite 3.3, Llama 3.3, and Mistral Large models
Execute standardized test prompts against all three model providers simultaneously
View side-by-side performance results to identify the optimal model for your workload
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/pfoo-provider-watsonx | bash Steps
Steps in the chain
Overview
Provider Watsonx
Compares IBM Granite 3.3, Meta Llama 3.3, and Mistral Large models available through the IBM watsonx.ai provider in promptfoo. Use when comparing IBM Granite, Llama, and Mistral model responses through IBM watsonx.ai.
What it does
This promptfoo example compares IBM Granite, Meta Llama, and Mistral models available through IBM watsonx.ai. Three specific models are tested side by side: IBM Granite 3.3 8B (the latest recommended Granite model), Meta Llama 3.3 70B (the latest Llama model), and Mistral Large (Mistral's flagship model).
When to use - and when NOT to
Use this example when comparing IBM Granite, Llama, and Mistral model responses through the IBM watsonx.ai provider.
Inputs and outputs
Requires IBM watsonx.ai authentication via either IAM API key (recommended):
export WATSONX_AI_APIKEY=your-ibm-cloud-api-key
export WATSONX_AI_PROJECT_ID=your-project-id
or a bearer token (WATSONX_AI_BEARER_TOKEN plus WATSONX_AI_PROJECT_ID). Run via npx promptfoo@latest init --example provider-watsonx then promptfoo eval (or npm run local -- eval --config examples/provider-watsonx/promptfooconfig.yaml for a local build), then view results with promptfoo view.
Integrations
Built on the IBM watsonx.ai provider, comparing IBM Granite 3.3 8B, Meta Llama 3.3 70B, and Mistral Large.
Who it's for
Engineers evaluating which model available through IBM watsonx.ai - Granite, Llama, or Mistral - best fits their use case, using promptfoo to run the comparison side by side.
Source README
provider-watsonx (IBM WatsonX Model Comparison)
This example compares IBM Granite, Meta Llama, and Mistral models available through IBM watsonx.ai.
You can run this example with:
npx promptfoo@latest init --example provider-watsonx
cd provider-watsonx
Setup
Set up authentication and project ID:
IAM Authentication (Recommended)
export WATSONX_AI_APIKEY=your-ibm-cloud-api-key
export WATSONX_AI_PROJECT_ID=your-project-id
Bearer Token Authentication
export WATSONX_AI_BEARER_TOKEN=your-bearer-token
export WATSONX_AI_PROJECT_ID=your-project-id
Follow the instructions in watsonx.md to retrieve your credentials and project ID.
Running the Example
promptfoo eval
Or with the local build:
npm run local -- eval --config examples/provider-watsonx/promptfooconfig.yaml
Afterwards, view the results:
promptfoo view
Models Tested
- IBM Granite 3.3 8B - Latest recommended Granite model
- Meta Llama 3.3 70B - Latest Llama model
- Mistral Large - Flagship Mistral model
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.