Prompt Chain

Compare LLM Performance on Riddles

Promptfoo example that compares OpenAI GPT-5.4, Anthropic Claude Sonnet 4.6, and Google Gemini 3.1 Pro Preview on riddle-solving tasks with cost, latency, and

Works with github

80
Spark score
out of 100
Updated 18 days ago
Version 0.121.18
Models
gpt 4oclaude 3 5 sonnetgemini 2 0

Add to Favorites

Why it matters

Evaluate and compare the performance of leading large language models (GPT, Claude, Gemini) on riddle-solving tasks. Gain insights into their cost, latency, and quality for informed decision-making.

Outcomes

What it gets done

01

Benchmark GPT-5.4, Claude Sonnet 4.6, and Gemini 3.1 Pro Preview.

02

Assess riddle-solving accuracy across different LLMs.

03

Analyze cost and latency metrics for each model.

04

Generate comparative quality assertions.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/pfoo-compare-gpt-vs-claude-vs-gemini | bash

Steps

Steps in the chain

01
Setup environment variables
02
Run evaluation
03
View results

Overview

Compare Gpt Vs Claude Vs Gemini

This promptfoo example compares three large language models on riddle-solving tasks with cost, latency, and quality assertions. Use this when you want to compare OpenAI GPT-5.4, Anthropic Claude Sonnet 4.6, and Google Gemini 3.1 Pro Preview on riddle-solving tasks and have API access to all three providers.

What it does

This promptfoo example compares three large language models - OpenAI's GPT-5.4, Anthropic's Claude Sonnet 4.6, and Google's Gemini 3.1 Pro Preview - on riddle-solving tasks. According to the source material, it includes cost, latency, and quality assertions.

When to use - and when NOT to

Use this example when you want to compare these three specific models on riddle-solving tasks.

Do not use this if you don't have API access to all three providers (OpenAI, Anthropic, and Google), or if you need to evaluate models on different types of tasks without modification.

Inputs and outputs

You provide API keys for OpenAI, Anthropic, and Google services as environment variables:

export OPENAI_API_KEY=your-openai-key
export ANTHROPIC_API_KEY=your-anthropic-key
export GOOGLE_API_KEY=your-google-key

You receive evaluation results from the promptfoo framework comparing the three models on riddle-solving tasks.

Integrations

This example requires API keys for OpenAI, Anthropic, and Google services. It uses the promptfoo evaluation framework.

To initialize and run the comparison:

npx promptfoo@latest init --example compare-gpt-vs-claude-vs-gemini
cd compare-gpt-vs-claude-vs-gemini

Then execute the evaluation:

npx promptfoo@latest eval

View the results:

npx promptfoo@latest view

Who it's for

This example is for users who want to compare GPT-5.4, Claude Sonnet 4.6, and Gemini 3.1 Pro Preview on riddle-solving tasks using the promptfoo framework.

Source README

compare-gpt-vs-claude-vs-gemini (GPT vs Claude vs Gemini Comparison)

This example compares OpenAI's GPT-5.4, Anthropic's Claude Sonnet 4.6, and Google's Gemini 3.1 Pro Preview on riddle-solving tasks with cost, latency, and quality assertions.

You can run this example with:

npx promptfoo@latest init --example compare-gpt-vs-claude-vs-gemini
cd compare-gpt-vs-claude-vs-gemini

See the guide for more details.

Setup

Set the required environment variables:

export OPENAI_API_KEY=your-openai-key
export ANTHROPIC_API_KEY=your-anthropic-key
export GOOGLE_API_KEY=your-google-key

Run

npx promptfoo@latest eval

View

npx promptfoo@latest view

FAQ

Common questions

Discussion

Questions & comments ยท 0

Sign In Sign in to leave a comment.