Concepts / Ranking Algorithms for Model Comparison

Ranking Algorithms for Model Comparison

Comparative evaluation selects two or more models to respond to the same request, and an evaluator picks the winner of each match, unlike A/B testing where one candidate is shown at a time.

  • Programming

Predicting What an Evaluator Sees

Suppose a team wants to find out which of several language models gives answers that people prefer. Each time they gather feedback, a person reads a response to a prompt. The design of that feedback loop matters a great deal, because it determines what the evaluator can compare and what the final results can mean.

What do you think happens?

In comparative evaluation, how many candidate responses does the evaluator see at once for a given request?

  • One

  • Two or more

  • Exactly five

Reveal answer
Answer:

Two or more

Comparative evaluation selects two or more models to respond to the same request, and an evaluator picks the winner of each match. Because the candidates appear together, each judgment is a direct contest between models.

Comparative Evaluation Versus A/B Testing

A common first impression is that comparative evaluation simply shows a user one model's answer, then another model's answer, and records which one the user liked more. That description sounds reasonable, but it describes a different method. Comparative evaluation has a specific structure, and confusing it with a neighboring technique leads to wrong conclusions about what the results mean.

The defining difference is in what the evaluator is shown. In A/B testing, one candidate is shown at a time, so the evaluator judges each candidate on its own. In comparative evaluation, two or more models answer the same request, and the evaluator sees them together and picks the winner of each match. The judgment is therefore relative: it says which response is preferred in that contest, not how good a response is in isolation.

Candidate shownaloneModel 1 responseModel 2 responseNext candidateshown aloneEvaluator pickswinnerSeparate judgmentthenjudged separatelyside by sideside by side
How the flow differs when one candidate is shown at a time (A/B testing) versus when several models answer the same request side by side (comparative evaluation).

Because the two methods ask different questions, they are not interchangeable. A single-candidate study can tell you how an evaluator responds to one answer. A comparative study tells you which of several answers wins head-to-head contests. Using the result of one method to make a claim that only the other can support is the mistake this distinction is meant to prevent.

Match Records and the Win Rate

Comparative evaluation records each contest as a row: which two models competed, and which one won. Each row is one judgment by an evaluator, and no row says anything about the models in isolation. Taken together, these rows form a history of head-to-head matches, which is the raw material for ranking.

A raw history is not yet an answer. A handful of matches cannot say whether one model is better than another in general. To answer that kind of question, the matches between the same pair of models must be summarized. That summary is the win rate of model A over model B, which estimates the probability that A is preferred over B.

Match 1A vs B, winner AMatch 2A vs C, excludedMatch 3A vs B, winner BMatch 4B vs C, excluded
Given a record of head-to-head matches, only the matches between A and B count toward the win rate of A over B. Matches that involve a third model are excluded from that calculation.
Rule

The calculation is a simple count. Find every match between A and B, count how many A won, divide by the total number of those matches, and express the result as a percentage. Matches against other opponents do not enter the numerator or the denominator.

Worked Example: Computing a Win Rate

Worked example

Win rate of model A over model B

A record contains 10 matches between A and B, and A wins 6 of them. The record also contains 4 matches between A and C and between B and C. What is the win rate of A over B?

  1. 1
    Select relevant matches

    Only the 10 matches between A and B count. The matches involving C are excluded, because they are not contests between the pair in question.

  2. 2
    Count wins by A

    A won 6 of those 10 matches.

  3. 3
    Divide wins by total matches

    6 divided by 10 gives 0.6.

  4. 4
    Express as a percentage

    Multiplying by 100 gives a win rate of 60 percent.

Result

The win rate of A over B is 60 percent. The 4 matches involving C do not change this value.

Turning Win Rates Into a Ranking

With two models, ranking is straightforward: the model that wins more often ranks higher. With five models, the problem changes. A table of ten pairwise win rates does not give an obvious order, because some models win against some opponents and lose to others. Models can have a favorable record against one rival and an unfavorable record against another, so no single pair decides the order.

This is the job of a rating algorithm. It first assigns each model a score based on the comparative signals, and then ranks the models by those scores. Each match contributes to the scores, and the accumulated scores produce the final ordering. The steps below trace that flow across a short match history.

Match 1A beats BMatch 2C beats AMatch 3B beats CFinal rankingordered by scorescores updatedscores updatedscores ranked
How each match result feeds into the models' scores, and how those scores accumulate into a final ranking.

Several rating algorithms have been adapted from other fields. Elo, Bradley-Terry, and TrueSkill come from sports and video games, where players have long been ranked from head-to-head results. Because these algorithms were built for different settings, they can treat the same comparison data differently.

Judging a Ranking by Its Predictions

Because different algorithms can order the same models differently, a ranking should not be accepted just because it was produced. A ranking is judged by how well it predicts future match outcomes. If a ranking places model A above model B, it should correctly anticipate which of them evaluators will prefer in matches not yet observed.

Recognizing When Preference Is a Weak Signal

Comparative evaluation measures which response evaluators prefer in head-to-head contests. That is a precise measurement, but it answers only the question it was built for. A preference record says which answer was liked more in that contest. It does not, by itself, establish that the preferred answer is the more accurate, safer, or more complete one on every dimension a team might care about.

Mistakes When Reading Comparison Results

  • Common mistake

    Treating comparative evaluation as A/B testing

    What it looks like

    Reporting that a model scored well because evaluators liked its single answer, when the study actually showed two answers together and recorded a winner.

    Why it fails

    The two methods differ in what the evaluator sees. One candidate at a time yields a judgment of that candidate alone, while side-by-side candidates yield a judgment of which one wins.

    Do this instead

    Describe the study by its structure: state whether the evaluator saw one candidate or several, and interpret the result only in those terms.

  • Common mistake

    Counting matches that do not involve the pair

    What it looks like

    Computing the win rate of A over B using every match in the record, including matches where A faced model C.

    Why it fails

    The win rate of A over B is defined from matches between A and B. Including other matches changes the denominator and the wins counted, so the result no longer describes the pair.

    Do this instead

    Filter the record to matches between A and B first, then count A's wins and divide by that filtered total.

  • Common mistake

    Inferring a full ranking from a single pairwise rate

    What it looks like

    Concluding the order of five models from one win rate between two of them.

    Why it fails

    With several models, some win against some opponents and lose to others, so one pairwise value does not determine an overall order.

    Do this instead

    Use a rating algorithm to convert the full set of comparison outcomes into scores, and then rank by those scores.

  • Common mistake

    Assuming one ranking algorithm produces the only correct ordering, when different algorithms can rank the same data differently

Practice: Win Rate From a Match Record

MEDIUM

A record contains these eight matches, each listed as winner first: A beats B, B beats A, A beats C, A beats B, B beats A, A beats B, C beats B, A beats B. Compute the win rate of A over B. Show which matches you counted and which you excluded.

Hints
  • Only matches where A and B are the two competitors count. Matches such as A beats C or C beats B should be excluded.
  • Count the matches between A and B first, then count how many of those A won.
  • Divide A's wins by the total of A-versus-B matches, then multiply by 100 to express a percentage.

Summary of Comparison Results

  1. 1
    Comparative evaluation shows two or more models answering the same request, and an evaluator picks the winner of each match. A/B testing shows one candidate at a time, so the two are not interchangeable.
  2. 2
    The win rate of A over B is the number of matches A won divided by the total matches between A and B, expressed as a percentage. Only matches between that pair count.
  3. 3
    A rating algorithm assigns each model a score from comparative signals and ranks the models by those scores. Elo, Bradley-Terry, and TrueSkill are examples adapted from sports and video games.
  4. 4
    Different ranking algorithms can produce different rankings from the same data, and a ranking is judged by how well it predicts future match outcomes. Preference records are a weak signal for questions an evaluator cannot judge from side-by-side responses.

At a glance

  • Comparative evaluation shows two or more models answering the same request, and an evaluator picks the winner of each match, which is different from A/B testing where one candidate is shown at a time.
  • The win rate of A over B is the number of matches A won divided by the total matches between A and B, expressed as a percentage.
  • A rating algorithm converts comparison outcomes into a score for each model and ranks the models by those scores. Different algorithms can produce different rankings from the same data.
  • Preference-based comparison is a weak signal for questions that an evaluator cannot judge from side-by-side responses.

More concepts starting with R