Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
Michael 360d7b519d
docs(examples): add uniform init commands to all example READMEs (#4068)
3 months ago
..
360d7b519d
docs(examples): add uniform init commands to all example READMEs (#4068)
3 months ago
02af9d6e5b
refactor(providers): split anthropic provider into modular components (#3406)
5 months ago
02af9d6e5b
refactor(providers): split anthropic provider into modular components (#3406)
5 months ago
02af9d6e5b
refactor(providers): split anthropic provider into modular components (#3406)
5 months ago

README.md

You have to be logged in to leave a comment. Sign In

claude-vs-gpt-image (Image Analysis Example)

You can run this example with:

npx promptfoo@latest init --example claude-vs-gpt-image

This example compares an image analysis task using:

  • gpt-4o via OpenAI
  • claude-3 via Amazon Bedrock
  • claude-3.5 via Anthropic

GPT-4o and Claude have different prompt formats. We use custom provider functions in Python and JavaScript to dynamically format the prompt based on context about the provider.

To get started, set your environment variables:

  • OPENAI_API_KEY
  • ANTHROPIC_API_KEY
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

If you do not have access to all of these providers, simply comment out the providers you do not have access to in promptfooconfig.yaml.

Then run:

npx promptfoo@latest eval

Afterwards, you can view the results by running:

npx promptfoo@latest view
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...