You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on Agent Council verdict — replaces the 'Plankton α' bio-derivation
with the correct EXP3 learning rate from Auer et al. 2002.
What changed:
- Added computeDiversityPenalty(providerName, nProviders): applies an
EXP3-inspired penalty when provider traffic share exceeds uniform (1/n).
gamma = sqrt(n * log(n) / (T * G^2)) — adapts over time as T grows.
- Added recordSelection(providerName): tracks traffic per provider.
- Applied diversity penalty in routeQuery after complexity_bias scoring,
re-ranking before quality floor check.
- Tested: no regression in eval (0.5893 identical to baseline).
- Verified: max provider share = 13.3% across 11 providers in 30-query
distribution test (near-uniform, no monoculture).
Why this matters:
- Prevents the 'competitive exclusion' failure mode where one dominant
provider captures all traffic, creating a single point of failure.
- The penalty is adaptive: strongest when T is small and a provider is
over-represented, weakens as the system stabilizes.
- Zero API call overhead, zero cost impact.
理论基础:
- Auer et al. 2002, 'The Nonstochastic Multiarmed Bandit Problem' (EXP3)
- Negative frequency-dependent selection (correct bio framing per Expert 4)
- NOT Armstrong-McGehee (static regularizer ≠ oscillation — Expert 2 finding)
Council consensus: this is the ONLY safe change to the main routing path.
Branch: feature/adaptive-diversity-weight
0 commit comments