Skip to main content

BestOf Metric

The BestOf metric runs tournament-style comparisons between multiple AI assistants to determine which performs best.

Overview

The metric:
  • Pairs assistants in elimination rounds
  • Uses an LLM judge to evaluate each matchup
  • Advances winners until a final champion is determined
  • Handles ties (both advance) and byes (odd number of contestants)

Installation

Basic Usage

Parameters

Required Parameters

Optional Parameters

Data Requirements

BestOf requires datasets from multiple assistants answering the same questions:

Output Schema

BestOfMetric

BestOfContest

Tournament Structure

Example: 4 Contestants

Special Cases

Ties: Both assistants advance to the next round Byes: With odd numbers, one assistant gets a free pass

Complete Example

Visualization

Tournament Bracket

Evaluation Criteria

Customize the criteria parameter to focus on specific aspects:

Use Cases

Model Selection

Compare multiple LLMs to find the best for your use case

A/B Testing

Evaluate different prompt strategies or configurations

Quality Benchmarking

Establish baseline quality across assistant versions

Continuous Improvement

Track improvements between model versions

Best Practices

Ensure all assistants answer the exact same questions for fair comparison.
Test different types of interactions:
  • Factual questions
  • Creative tasks
  • Problem-solving
  • Multi-turn conversations
Be specific about what matters for your use case in the criteria parameter.
Larger models (GPT-4, Claude-3, Llama-3-70B) provide more reliable judgments.

Next Steps

AWS Lambda

Deploy BestOf as serverless function

Generators

Generate test datasets automatically

Runners

Execute tests against AI systems