Prompt Chain

Compare Model Outputs Across Prompts

Promptfoo config restricting which prompt templates run against which model provider, instead of the full prompt-times-provider matrix.


91
Spark score
out of 100
Updated 29 days ago
Version code-scan-action-0.1

Add to Favorites

Why it matters

Evaluate and compare the performance of different AI models on a given set of prompts. This asset helps you understand which models perform best for your specific use cases.

Outcomes

What it gets done

01

Run a set of prompts against multiple AI models.

02

Extract and analyze the outputs from each model.

03

Compare and classify the quality of model responses.

04

Identify the most effective model for each prompt.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/pfoo-prompts-per-model | bash

Overview

Prompts Per Model

This Promptfoo example uses the per-provider prompts field to run different prompt variants against different models - gpt-4.1-mini gets two prompts, gpt-4 gets only one - instead of the default full prompt-times-provider matrix. Use it as a template when different models need different prompt variants rather than being tested against a uniform prompt set.

What it does

This Promptfoo config demonstrates the per-provider prompts field, which restricts which prompt templates run against which model rather than running every prompt against every provider by default. Two prompts are defined, loaded from external prompt1.txt and prompt2.txt files and labeled "My first prompt" and "My second prompt". gpt-4.1-mini is configured to run both prompts, while gpt-4 is restricted to only the first prompt - so the eval matrix is asymmetric rather than the full cross-product of prompts and providers.

Sixteen test cases each supply a different topic variable, ranging from playful ones like "bananas" and "midnight snacking" to substantive ones like "the ethical implications of AI" and "the impact of deepfakes on societal trust", each run against whichever prompt and provider combinations are configured.

When to use - and when NOT to

Use it as a template when different models need different prompt variants - for example, a longer, more explicit prompt for a weaker model and a terser one for a stronger model - rather than testing every prompt against every provider. Do not use it if all your providers should be tested against the same full set of prompts, which is Promptfoo's default behavior already.

Inputs and outputs

Input: the YAML config - two external prompt files and per-provider prompts lists restricting which prompts each model runs - plus 16 topic variables. Output: Promptfoo's evaluation report, with gpt-4.1-mini results for both prompts and gpt-4 results for only the first, side by side per topic.

Integrations

Uses Promptfoo's per-provider prompts field alongside its external prompt-file loading (file://) and prompt labeling.

Who it's for

Teams that need to test different, per-model prompt variants against different providers rather than a uniform prompt set applied to every provider.

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.