Online LLM Personalization from Pairwise Preferences Across Users
Organizations: Massachusetts Institute of Technology
Abstract
Large language models can answer the same question in different styles, but users' preferred styles are hidden and vary across users and questions. We study inference-time personalization through online selection from a fixed set of prompts, each representing a persona. Users arrive sequentially, each asks a short sequence of questions, and the system displays two responses per question and observes one pairwise choice. We formulate this interaction as a variant of the contextual dueling bandit problem in which the learner starts without preference data, adapts within each session, and exploits information shared across users. The objective is to minimize cumulative strong regret, summing the utility gaps of both displayed responses relative to the user's best response among the available options. We make two contributions. First, we introduce the problem and release a reproducible preference benchmark and dataset built around a tutoring case study, containing educational questions, LLM-generated answers in six teaching styles, and pairwise judgments from LLM-simulated students with hidden preference profiles. We fit Bradley-Terry models to these judgments to obtain reference utilities for regret evaluation. Second, we propose a baseline that learns a mixture prior over users from completed sessions and adapts to each new user within the session. On students and topics never used in development, it removes 44-48% of random pairs' excess regret and achieves over half the performance of a per-user linear oracle fitted in hindsight. We release code, prompts, and the benchmark.
Figures & tables
| method | held-out profiles | Composite | Quirky | |||
| excess | score | excess | score | excess | score | |
| random pairs | 2317.3 | 0 | 2276.1 | 0 | 2305.5 | 0 |
| best fixed pair | 2197.5 | 5 | 1900.0 | 17 | 1790.3 | 22 |
| best fixed pair per user (hindsight) | 546.7 | 76 | 763.2 | 66 | 726.6 | 68 |
| per-user linear oracle | 356.8 | 85 | 427.8 | 81 | 411.8 | 82 |
| distinct-pair floor | 0.0 | 100 | 0.0 | 100 | 0.0 | 100 |
Appendix figures & tables28 assets
Supplementary material from the paper’s appendix.
Appendix
| statistic | development | held-out topics | held-out profiles | Composite | Quirky |
|---|---|---|---|---|---|
| arrivals | 300 | 350 | 350 | 350 | 350 |
| distinct profiles | 8 | 8 | 8 | 350 | 350 |
| share of centered score variance (%) | |||||
| shared persona effects | 18.0 | 20.5 | 7.1 | 13.1 | 13.0 |
| profile–persona differences | 31.7 | 28.2 | 50.3 | 30.4 | 34.5 |
| sessions within profiles | 2.0 | 2.1 | 1.9 | 0.0 | 0.0 |
| diagnostic | development | held-out topics | held-out profiles | Composite | Quirky |
| sampled choices that are a valid label (%) | 100.0 | 100.0 | 100.0 | 100.0 | 100.0 |
| prompts whose choices agree (%) | 77 | 78 | 79 | 73 | 74 |
| persona pairs with all choices on one side (%) | 40 | 41 | 41 | 38 | 39 |
| reliability: split of each prompt’s choices | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 |
| lean toward the first-shown answer (logits) | +0.38 | +0.38 | +0.48 | +0.24 | +0.24 |
| lean toward the label A (logits) | +0.22 | +0.21 | +0.13 | +0.22 | +0.23 |
| (a) Pairs of raters | ||||
|---|---|---|---|---|
| Pair | Agreement (%) | Cohen’s | ||
| Author 1 and author 2 | 69.6 [61.8, 77.0] | 0.39 | ||
| gpt-6-luna and author 1 | 74.0 | 0.48 | ||
| gpt-6-luna and author 2 | 73.0 | 0.46 | ||
| TypeSafe Jev and author 1 | 71.1 | 0.42 | ||
| TypeSafe Jev and author 2 | 76.0 | 0.52 | ||
| statistic | held-out profiles | Composite | Quirky |
| same favored answer, comparisons (%) | 84.3 | 78.5 | 79.4 |
| where gpt-6-luna gives (%) | 96.1 | 92.5 | 92.8 |
| click agreement, Jev with gpt-6-luna | 0.68 | 0.64 | 0.65 |
| two gpt-6-luna clicks | 0.70 | 0.70 | 0.70 |
| two Jev clicks | 0.75 | 0.70 | 0.71 |
| same most-preferred persona, students (%) | 88 | 72 | 77 |
| method | held-out profiles | Composite | Quirky | |||
|---|---|---|---|---|---|---|
| excess | score | excess | score | excess | score | |
| random pairs | 3008.2 | 0 | 2529.8 | 0 | 2551.8 | 0 |
| best fixed pair | 2510.0 | 17 | 1329.1 | 47 | 1809.3 | 29 |
| per-user linear oracle | 293.4 | 90 | 264.5 | 90 | 259.7 | 90 |
| distinct-pair floor | 0.0 | 100 | 0.0 | 100 | 0.0 | 100 |
| RUCB (pooled, non-contextual) | 2560.3 8.0 | 15 | 1545.7 8.0 | 39 | 1866.6 7.7 | 27 |
| compared with | held-out profiles | Composite | Quirky |
|---|---|---|---|
| RUCB (pooled, non-contextual) | +51.4% [+50.1%, +52.7%] | +27.0% [+22.4%, +31.6%] | +36.2% [+33.2%, +39.5%] |
| Pooled | +51.6% [+48.8%, +54.5%] | +36.3% [+26.9%, +46.3%] | +40.5% [+34.4%, +47.5%] |
| CoLSTIM | +26.3% [+24.9%, +27.6%] | +26.6% [+24.0%, +29.0%] | +21.9% [+19.5%, +24.1%] |
| COLDB | +30.5% [+28.4%, +32.7%] | +22.3% [+19.1%, +25.5%] | +21.8% [+19.1%, +24.8%] |
| COLDB-LR | +25.4% [+22.9%, +27.9%] | +26.2% [+23.3%, +29.3%] | +25.1% [+22.1%, +28.2%] |
| Meta-TS | +49.8% [+47.9%, +51.7%] | +23.6% [+17.2%, +30.6%] | +36.5% [+32.4%, +40.4%] |
| method | held-out topics | development | ||
|---|---|---|---|---|
| excess | score | excess | score | |
| random pairs | 2613.7 | 0 | 2238.3 | 0 |
| best fixed pair | 1468.9 | 44 | 1320.1 | 41 |
| per-user linear oracle | 279.3 | 89 | 227.8 | 90 |
| distinct-pair floor | 0.0 | 100 | 0.0 | 100 |
| RUCB (pooled, non-contextual) | 1697.0 5.9 | 35 | 1565.8 9.0 | 30 |
| profile | users ( ) | CODuel | CoLSTIM |
|---|---|---|---|
| retaking the course | 44 | 29 | 25 |
| self-taught programmer | 44 | 44 | 26 |
| returning adult | 44 | 56 | 33 |
| olympiad student | 44 | 36 | 30 |
| humanities graduate | 44 | 61 | 45 |
| engineer with a deadline | 44 | 42 | 25 |
| policy | held-out profiles | Composite | Quirky |
|---|---|---|---|
| CODuel | 55 [45, 64] | 45 [42, 47] | 46 [43, 49] |
| COLDB | 33 [8, 54] | 38 [32, 43] | 38 [26, 45] |
| CoLSTIM | 34 [29, 39] | 28 [26, 30] | 29 [26, 31] |
| Meta-TS | 32 [12, 53] | 34 [27, 40] | 36 [27, 44] |
| HierTS | 33 [15, 55] | 36 [29, 41] | 38 [29, 44] |
| ablation: no transfer | 31 [27, 35] | 27 [25, 29] | 27 [25, 30] |
| method | held-out profiles | Composite | Quirky | |||
|---|---|---|---|---|---|---|
| excess | score | excess | score | excess | score | |
| random pairs | 2317.3 | 0 | 2276.1 | 0 | 2305.5 | 0 |
| best fixed pair | 2197.5 | 5 | 1900.0 | 17 | 1790.3 | 22 |
| per-user linear oracle | 356.8 | 85 | 427.8 | 81 | 411.8 | 82 |
| distinct-pair floor | 0.0 | 100 | 0.0 | 100 | 0.0 | 100 |
| RUCB (pooled, non-contextual) | 1918.5 5.9 | 17 | 1557.1 8.1 | 32 | 1528.8 7.0 | 34 |
| compared with | held-out profiles | Composite | Quirky |
|---|---|---|---|
| RUCB (pooled, non-contextual) | +37.6% [+36.3%, +38.8%] | +18.0% [+15.4%, +20.9%] | +18.2% [+15.4%, +20.9%] |
| Pooled | +37.6% [+34.3%, +41.1%] | +18.5% [+14.1%, +22.9%] | +19.5% [+13.0%, +26.1%] |
| CoLSTIM | +22.5% [+21.2%, +23.8%] | +22.0% [+19.9%, +24.1%] | +24.2% [+22.0%, +26.5%] |
| COLDB | +33.5% [+31.0%, +36.3%] | +9.3% [+5.9%, +12.7%] | +12.5% [+7.7%, +17.4%] |
| COLDB-LR | +33.9% [+32.5%, +35.3%] | +15.3% [+12.6%, +18.1%] | +15.5% [+12.8%, +18.2%] |
| Meta-TS | +33.3% [+31.9%, +34.5%] | +14.6% [+11.5%, +17.9%] | +16.2% [+12.6%, +19.4%] |
| method | held-out topics | development | ||
|---|---|---|---|---|
| excess | score | excess | score | |
| random pairs | 2341.4 | 0 | 2000.9 | 0 |
| best fixed pair | 1315.0 | 44 | 1173.9 | 41 |
| per-user linear oracle | 364.6 | 84 | 307.0 | 85 |
| distinct-pair floor | 0.0 | 100 | 0.0 | 100 |
| RUCB (pooled, non-contextual) | 1389.1 4.3 | 41 | 1257.6 6.6 | 37 |
| compared with | held-out topics | development |
|---|---|---|
| RUCB (pooled, non-contextual) | +21.7% [+20.3%, +23.3%] | +22.7% [+20.7%, +24.6%] |
| Pooled | +23.9% [+21.1%, +26.9%] | +29.9% [+22.7%, +38.8%] |
| CoLSTIM | +33.4% [+32.2%, +34.5%] | +29.7% [+28.1%, +31.3%] |
| COLDB | +17.9% [+16.3%, +19.5%] | +18.3% [+16.3%, +20.4%] |
| COLDB-LR | +18.9% [+17.5%, +20.5%] | +19.4% [+17.5%, +21.2%] |
| Meta-TS | +20.3% [+18.8%, +22.0%] | +20.8% [+19.0%, +22.6%] |
| method | held-out profiles | Composite | Quirky | |||
|---|---|---|---|---|---|---|
| first 25% | last 25% | first 25% | last 25% | first 25% | last 25% | |
| no transfer | 4.61 | 4.65 | 4.74 | 4.75 | 4.77 | 4.80 |
| CODuel | 3.90 | 3.19 | 4.08 | 3.45 | 4.01 | 3.37 |
| type-library reference | 5.10 | 5.16 | 4.42 | 4.42 | 4.38 | 4.42 |
| population | no transfer | RUCB | CoLSTIM | COLDB | COLDB-LR | Pooled | Meta-TS | HierTS | AdaTS | CODuel | oracle |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 types, | 936 6 | 2066 22 | 911 7 | 288 9 | 260 10 | 298 10 | 332 9 | 322 9 | 325 9 | 178 3 | 105 3 |
| 2 types, | 930 5 | 2045 25 | 905 6 | 624 19 | 308 7 | 644 20 | 675 18 | 660 19 | 664 18 | 219 2 | 156 4 |
| 4 types, | 934 4 | 2081 18 | 907 5 | 440 11 | 472 10 | 454 11 | 487 11 | 476 11 | 477 11 | 297 5 | 208 4 |
| 4 types, | 932 4 | 2061 16 | 905 5 | 1051 18 | 600 10 | 1075 19 | 1101 19 | 1083 18 | 1087 18 | 401 4 | 335 5 |
| 8 types, | 926 4 | 2068 16 | 903 5 | 537 7 | 669 9 | 551 8 | 586 8 | 574 8 | 576 8 | 416 4 | 304 4 |
| method | tutoring | simulator |
|---|---|---|
| CoLSTIM | 64 configurations | 96 configurations |
| COLDB | 40 configurations | 20 configurations |
| COLDB-LR | 20 configurations | 20 configurations |
| RUCB | 4 configurations | 4 configurations |
| Meta-TS | 63 configurations | 63 configurations |
| HierTS | 45 configurations | 63 configurations |
| method | held-out profiles | Composite | Quirky | ||||||
|---|---|---|---|---|---|---|---|---|---|
| dev. choice | best on roster | its configuration | dev. choice | best on roster | its configuration | dev. choice | best on roster | its configuration | |
| CoLSTIM | 33 | 34 | c1:l0.1:g0.1 | 28 | 28 | c1:l0.3:g0.3 | 28 | 29 | c1:l0.1:g0.1 |
| COLDB | 22 | 32 | a0.01:c0.03 | 38 | 39 | a0.03:c0 | 38 | 40 | a0.03:c0.1 |
| COLDB-LR | 22 | 34 | t0.25:c0.3 | 34 | 34 | t2:c0.1 | 36 | 36 | t2:c0.3 |
| RUCB | 17 | 17 | a0.51 | 32 | 32 | a0.51 | 34 | 34 | a0.51 |
| Meta-TS | 23 | 23 | s0=3:sq=10 | 34 | 36 | s0=0.0003:sq=1 | 35 | 38 | s0=0.003:sq=1 |
| method | held-out profiles | Composite | Quirky |
|---|---|---|---|
| Meta-TS | -1.3 [-2.0, -0.6] | +0.8 [-1.9, +3.5] | -0.6 [-3.6, +2.5] |
| HierTS | -0.1 [-0.7, +0.5] | +1.5 [+0.4, +2.5] | -1.7 [-3.7, +0.2] |
| AdaTS | +0.8 [-1.6, +3.2] | +1.3 [-1.2, +3.7] | -2.1 [-6.3, +2.2] |
| reference | held-out profiles | Composite | Quirky | held-out topics | development |
|---|---|---|---|---|---|
| best fixed pair per user | 76 | 66 | 68 | 74 | 73 |
| known-profile pair | 75 | – | – | 73 | 72 |
| type-library reference | 23 | 32 | 33 | 54 | 52 |
| variant | increase in excess regret [95% CI] |
|---|---|
| CODuel (excess regret) | 970.8 4.7 |
| no transfer (base learner only) | +449.7 [+434.7, +464.6] |
| greedy pair rule instead of lookahead | +5.2 [-7.9, +18.2] |
| latent-bandit Thompson sampling instead of lookahead | +213.0 [+196.8, +229.1] |
| latent-bandit UCB instead of lookahead | +128.5 [+109.4, +147.6] |
| no evidence gate | +8.1 [-4.9, +21.1] |
| variant | held-out profiles | Composite | Quirky |
|---|---|---|---|
| greedy pair rule instead of lookahead | +46.6 [+33.7, +59.5] | -18.0 [-33.4, -2.7] | -1.7 [-16.6, +13.2] |
| no evidence gate | +3.1 [-9.8, +16.0] | -19.1 [-33.4, -4.8] | -7.8 [-24.7, +9.1] |
| one tight type instead of the mixture (no spread between users) | +359.0 [+344.1, +374.0] | +120.6 [+102.2, +139.0] | +147.2 [+127.3, +167.0] |
| one Gaussian with learned covariance instead of the mixture | +84.4 [+71.5, +97.2] | -28.1 [-46.8, -9.3] | -29.7 [-43.7, -15.7] |
| no population (recalibration kept) | +370.4 [+359.1, +381.7] | +368.5 [+346.2, +390.8] | +384.1 [+367.9, +400.3] |
| no recalibration ( ) | +33.7 [+21.6, +45.9] | +29.7 [+17.2, +42.2] | +50.7 [+34.9, +66.5] |
| setting | held-out profiles | Composite | Quirky |
|---|---|---|---|
| gate threshold (paper ) | -0.1 [-0.6, +0.5] | +0.6 [-0.1, +1.4] | +0.0 [-0.8, +0.9] |
| gate threshold | -0.3 [-0.9, +0.2] | +0.5 [-0.2, +1.3] | +0.2 [-0.4, +0.7] |
| gate minimum (paper ) | +0.1 [-0.5, +0.6] | +0.6 [-0.1, +1.2] | +0.3 [-0.3, +0.9] |
| gate minimum | -0.7 [-1.2, -0.1] | +0.5 [-0.2, +1.1] | +0.1 [-0.5, +0.7] |
| components (paper ) | -0.4 [-0.9, +0.1] | +0.6 [-0.1, +1.3] | +0.0 [-0.6, +0.7] |
| components | -0.3 [-0.9, +0.3] | +0.6 [+0.0, +1.2] | +0.2 [-0.4, +0.8] |
| control | excess of no transfer | change with CODuel | 95% CI |
|---|---|---|---|
| simulator, null population | 864.8 | -0.3% | [-1.4%, +0.9%] † |
| tutoring, scrambled roster | 1453.7 | +0.9% | [-0.5%, +2.2%] |
| control | policy | excess regret | change vs. no transfer [95% CI] |
|---|---|---|---|
| simulator null ( , ) | CODuel | 867.0 3.5 | -0.3% [-1.4%, +0.9%] |
| without gate | 973.6 4.5 | -12.6% [-13.6%, -11.5%] | |
| no population | 868.4 4.4 | -0.4% [-1.4%, +0.6%] | |
| scrambled roster ( ) | CODuel | 1441.2 4.6 | +0.9% [+0.0%, +1.7%] |
| without gate | 1463.5 3.3 | -0.7% [-1.5%, +0.1%] | |
| no population | 1436.3 3.5 | +1.2% [+0.4%, +2.0%] |
| pair rule (profiles’ tables known) | excess regret |
|---|---|
| greedy | 961.8 2.8 |
| one-step lookahead | 954.6 2.9 |
| latent-bandit Thompson sampling | 1197.6 3.8 |
| latent-bandit UCB | 1114.6 1.6 |
LLM Personalization
LLM personalization adapts language models to users’ preferences, histories, expertise, and changing goals while balancing usefulness, privacy, and control.
See all 130 papers