Applied AI / preference modeling
LLM Response Quality Classification
I started with a small rubric for reviewing response quality, then moved to a larger question: can a model predict human preferences while admitting that reviewers sometimes disagree?
Research question
Can a text model tell the difference between a clear winner and a genuinely ambiguous comparison?
The main data source is the public Arena preference export. Each record contains a prompt, two responses, and a human vote. Instead of collapsing every vote into a binary winner, the pipeline keeps model A, model B, tie, and tie (bothbad) as separate outcomes.
| Dataset / protocol | Size | Notes |
|---|---|---|
| Arena export | 135,634 votes | 53 models; 126 languages |
| Development pool | 108,507 rows | Grouped by normalized question |
| Frozen temporal test | 27,127 rows | Held out before formal baseline |
| Primary metric | Macro-F1 | Accuracy and tie recall reported alongside |
Evaluation design
The split is part of the model
- A
Start with the label
The task has four outcomes: model A wins, model B wins, tie, or both responses are bad. Keeping the two tie outcomes matters because a winner-only classifier can hide disagreement.
- B
Keep prompts together
The development folds are grouped by a normalized question so a near-duplicate prompt does not appear in both training and validation.
- C
Separate development from test
Model selection uses the chronological train pool. A separate 27,127-row temporal split is frozen for the formal baseline.
- D
Compare simple models first
Word and character TF-IDF provide interpretable references before introducing soft targets or a neural scorer.
- E
Model disagreement explicitly
Soft-label training and pairwise scoring are evaluated with tie recall, Macro-F1, calibration, and error slices rather than accuracy alone.
- F
Keep the encoder result honest
The pretrained pairwise encoder is still a development experiment. More rows did not automatically produce a better Macro-F1.
Model comparison
More complexity did not automatically solve the hard part
The development metric is Macro-F1 because the two tie classes are smaller than the two winner classes. Tie recall is reported separately because a system that never predicts ties can still look acceptable on accuracy.
| Model | Accuracy | Macro-F1 | Tie recall | Macro-F1 95% CI | Protocol |
|---|---|---|---|---|---|
| Word TF-IDF | 0.3609 | 0.2508 | 0.1005 | [0.2323, 0.2693] | 3 seeds × 3-fold |
| Character TF-IDF | 0.3522 | 0.2488 | — | [0.2304, 0.2672] | 3 seeds × 3-fold |
| Class-balanced soft-label TF-IDF | 0.3227 | 0.2850 | 0.3385 | [0.2833, 0.2867] | 3 seeds × 3-fold |
| Pairwise TF-IDF ranker | 0.2882 | 0.2674 | 0.7016 | [0.2481, 0.2866] | 3 seeds × 3-fold |
| Pairwise BERT, 2K MPS | 0.2860 | 0.2416 | 0.6546 | — | 2 epochs; 3-fold |
| Pairwise BERT, 5K MPS | 0.2604 | 0.2398 | 0.6989 | — | 2 epochs; 3-fold |
| Formal locked word TF-IDF | 0.3463 | 0.2505 | — | single test value | 27,127 frozen rows |


What changed with soft labels
The best current model trades some winner accuracy for better disagreement coverage
The class-balanced soft-label TF-IDF model reached mean Macro-F1 0.2850 and mean tie recall 0.3385 across three seeds. Its accuracy was lower than the hard-label baseline. That is not a universal improvement; it is a deliberate choice to make ambiguous judgments visible.
| Training target | Accuracy | Macro-F1 | Tie recall | ECE |
|---|---|---|---|---|
| Hard-label TF-IDF | 0.3662 | 0.2595 | 0.1005 | — |
| Class-balanced soft-label TF-IDF | 0.3227 | 0.2850 | 0.3385 | 0.0179 |

The pairwise TF-IDF ranker pushed tie recall to 0.7016, but its Macro-F1 was 0.2674. It shows that the score-difference structure is useful, while the underlying response-quality scorer still needs work.
Pretrained encoder
The encoder is currently an exploratory result
The shared BERT pairwise scorer was run locally with MPS on 2K and 5K rows. The 5K run reached Macro-F1 0.2398 and tie recall 0.6989. It is not selected as the final model. The next fair comparison would fix the seeds, epochs, token budget, and development folds before any new locked evaluation.
| Pairwise scorer | Accuracy | Macro-F1 | Tie recall | Training |
|---|---|---|---|---|
| Pairwise TF-IDF | 0.2882 | 0.2674 | 0.7016 | 3 seeds |
| Pairwise BERT, 2K MPS | 0.2860 | 0.2416 | 0.6546 | 2 epochs |
| Pairwise BERT, 5K MPS | 0.2604 | 0.2398 | 0.6989 | 2 epochs |
Error and slice analysis
The weak slice is creative writing, not the largest language group
These are descriptive word-TF-IDF out-of-fold slices. The sample size is shown because a higher slice accuracy is not automatically more reliable when the slice is small.
| Slice | Accuracy | Rows |
|---|---|---|
| Russian | 0.402 | 184 |
| Polish | 0.391 | 297 |
| Hard prompt | 0.372 | 1,446 |
| Code | 0.367 | 849 |
| English | 0.358 | 1,574 |
| Math | 0.348 | 264 |
| No domain knowledge | 0.317 | 526 |
| Creative writing | 0.288 | 264 |

Formal locked evaluation
The locked result is reported once and then left alone
The word-TF-IDF baseline was trained on 5,000 sampled train-pool rows and evaluated on all 27,127 frozen temporal rows. This table is a final reference point; it is not used to tune the newer soft-label or encoder models.
| Metric | Value | Evaluation set |
|---|---|---|
| Accuracy | 0.3463 | 27,127 locked rows |
| Macro-F1 | 0.2505 | 27,127 locked rows |
| Weighted-F1 | 0.3160 | 27,127 locked rows |
Takeaway
The useful result is a better evaluation question
The hard-label baseline learns a winner signal but misses disagreement. Soft targets improve the balance between winner and tie classes, while pairwise scoring makes the disagreement trade-off easier to inspect. The current evidence supports the evaluation design; it does not support claiming that the pretrained encoder is already the best model.
Read the code and reports on GitHub