Evaluate and Select Best AI Output from Multiple Options
Evaluate multiple AI outputs side-by-side and automatically select the best response based on your quality criteria.
Why it matters
Automatically evaluate multiple AI-generated outputs and select the best one based on defined criteria, enabling systematic comparison and quality control for AI responses.
Outcomes
What it gets done
Run evaluation tests across multiple AI prompt variations
Compare outputs using structured assessment criteria
Rank and select the highest-quality response automatically
View and analyze evaluation results through a dashboard
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/pfoo-eval-select-best | bash Steps
Steps in the chain
Overview
Eval Select Best
A promptfoo example workflow template for evaluation setup When you need a starting configuration for promptfoo evaluations
What it does
Eval Select Best is a promptfoo example workflow that demonstrates how to set up and run evaluations using promptfoo. It provides a starting configuration that you can customize with your own prompts, test cases, and evaluation criteria.
When to use - and when NOT to
Use this example when you want a starting point for setting up promptfoo evaluations with a pre-configured example. It's helpful when you're learning how to structure your promptfooconfig.yaml file and want to see a working configuration.
Do NOT use this if you need a different type of evaluation example - promptfoo offers other example templates that may better suit your specific use case. This is a starting template, not a production-ready solution.
Inputs and outputs
You provide your OPENAI_API_KEY environment variable and can edit the promptfooconfig.yaml file to customize the configuration.
You receive evaluation results that can be viewed using the promptfoo view command.
How to use
Initialize the example in your environment:
npx promptfoo@latest init --example eval-select-best
cd eval-select-best
Set your OpenAI API key as an environment variable, then edit the promptfooconfig.yaml file to customize your configuration. Run the evaluation:
promptfoo eval
After the evaluation completes, view the results by running promptfoo view.
Who it's for
This example workflow is designed for developers and prompt engineers who want to get started with promptfoo evaluations using a pre-configured example as a foundation for their own testing setup.
Source README
eval-select-best (Select Best Example)
You can run this example with:
npx promptfoo@latest init --example eval-select-best
cd eval-select-best
Usage
To get started, set your OPENAI_API_KEY environment variable.
Next, edit promptfooconfig.yaml.
Then run:
promptfoo eval
Afterwards, you can view the results by running promptfoo view
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.