17.3 Elo Rating & Leaderboards
Four people compare anonymous answers from two models. Two prefer A and two prefer B. Someone processes the votes in the order they arrived. A colleague processes the same file in reverse. Can they end up naming different winners?
They can if they update an Elo rating after each vote. The two orders below move the same pair of ratings. Watch what happens to A when its first two wins make the next loss a surprise.
The Mechanism: Crowdsourced Duels
A voter gives both anonymous models the same prompt, reads their responses, and selects A, B, or a tie. The observation is a preference on that prompt. A judge can prefer a well-written answer that contains an error. The early Chatbot Arena study collected blind comparisons this way [2].
Two wins and two losses
A wins, wins, loses, losesA loses, loses, wins, wins
See the rating after each vote
| Votes | A wins, wins, loses, loses | A loses, loses, wins, wins |
|---|---|---|
| 0 | 1500.0 | 1500.0 |
| 1 | 1516.0 | 1484.0 |
| 2 | 1530.5 | 1469.5 |
| 3 | 1511.7 | 1488.3 |
| 4 | 1494.7 | 1505.3 |
Calculated from the Elo formula below using illustrative votes. Both models start at 1500 and use K = 32 at every update.
With wins first, A climbs to 1530.5 and finishes at 1494.7, below B. With losses first, A finishes at 1505.3, above B. No voter changed their mind. Each update used a different estimate of what the next vote would look like.
The Mathematics of Elo
Elo expresses the expected score of one competitor against another as a function of their rating difference [1].
1. Expected Score
Given two models with ratings and , the expected score for Model A is calculated using a logistic curve:
Similarly, for Model B:
With half credit for a tie, and . A 400-point advantage gives an expected score of about 0.91, which is a win probability only when ties are absent. The scale 400 and rating origin are conventions; scores from different leaderboards are not directly comparable.
2. Rating Update
After a duel, the ratings are updated based on the actual score and the expected score :
Here is 1 for a win, 0.5 for a tie and 0 for a loss. The step size controls how strongly a single vote changes the rating. B receives the opposite update, so the sum of the two ratings stays constant.
After A’s first two wins, its rating is 1530.53 and B’s is 1469.47. The expected score for A is about 0.587. A loss now costs , or about 18.8 points. Losing the opening vote would have cost only 16. Replay the four votes with Python’s standard library. Round only when displaying the results.
def replay(votes, k=32):
a = b = 1500.0
path = [a]
for vote in votes:
expected = 1 / (1 + 10 ** ((b - a) / 400))
change = k * (vote - expected)
a += change
b -= change
path.append(a)
return path
for votes in ([1, 1, 0, 0], [0, 0, 1, 1]):
print([round(rating, 1) for rating in replay(votes)])
Beyond Elo: The Bradley-Terry Model
Suppose model versions are fixed and all four votes count equally. In a two-model Bradley–Terry fit with no ties, the estimated probability that A wins is . The fitted rating difference is zero in either order. Both ratings can move together without changing that probability, so fix one reference rating or constrain their sum. With more models, groups that never play each other cannot be placed relative to one another from these votes alone. All wins and no losses for one side can also prevent a finite unregularized estimate.
In December 2023, the Arena team described moving its leaderboard from online Elo to a Bradley–Terry fit. This historical change matters when reproducing a published score. Know whether the evaluator replayed individual votes or fitted the complete set [3].
Reading a leaderboard
Our sample contains four votes. A fitted difference of zero leaves considerable uncertainty about future voters. Report uncertainty on the difference itself. When one person or one prompt produces several votes, preserve those groups in your uncertainty estimate. Record how ties were handled and how prompts, model versions and judges were sampled [4].
Implementing Batch Elo Updates in PyTorch
Four votes for the same pair form a sequence. A vector operation can instead update several independent pairs at once. In this example each row has its own two models. In row one A wins. In row two the voter declares a tie.
This snippet updates one vote per pair. A leaderboard still needs persistent model IDs, a policy for repeated votes and a defined processing order.
import torch
def compute_batch_elo_update(ratings_a, ratings_b, outcomes, k_factor=32.0):
expected = 1 / (1 + 10 ** ((ratings_b - ratings_a) / 400))
change = k_factor * (outcomes - expected)
return ratings_a + change, ratings_b - change
a = torch.tensor([1500.0, 1500.0])
b = torch.tensor([1500.0, 1500.0])
print(compute_batch_elo_update(a, b, torch.tensor([1.0, 0.5])))
# (tensor([1516., 1500.]), tensor([1484., 1500.]))
A product leaderboard
Imagine choosing a model that drafts refund emails. Voters might prefer friendly prose even when the message quotes the wrong refund amount. Keep that factual check alongside the preference votes, and sample each candidate on the same case mix. Record model and prompt versions so that a change in refund policy or model deployment can be traced back to the affected comparisons.
Quizzes
Quiz 1: How can A lead in one replay and B lead in the other when both have two wins?
Online Elo uses the current ratings to predict the next vote. After two wins, A loses more points for a defeat than it would from a tied start. Reversing the votes reverses this effect.
Quiz 2: Does a 400-point advantage mean a 91% win rate?
Only without ties. With half credit for ties, about 0.91 is the expected score: win probability plus half the tie probability.
Quiz 3: Can Bradley–Terry compare disconnected groups of models?
Their relative scores are not identified by the observations alone. Connect the comparison graph; do not interpret a regularizer-imposed difference as observed evidence.
Quiz 4: Why not deploy the top public model directly into a RAG product?
Its prompt distribution and preference criteria may differ from the product. Check grounding, citations, security, cost and latency in private workflow evaluations and a canary.
Quiz 5: What constraints and policies must an offline Bradley–Terry estimate record?
Record the reference-score or zero-sum constraint, tie treatment, regularization, comparison-graph connectivity, sample weights and uncertainty method. Optimizing binary comparison likelihood does not automatically resolve bias or identification.
References
- Elo, A. E. (1978). The Rating of Chessplayers, Past and Present. Arco.
- Zheng, L., et al. (2023). Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena. arXiv:2306.05685.
- LMSYS Org. (2023). Chatbot Arena: New models & Elo system update.
- Chiang, W.-L., et al. (2024). Chatbot Arena: An Open Platform for Evaluating LLMs by Human Preference.