Weighted Random Picker
May 20, 2026 · View on GitHub
Selects model randomly, where the probability of a model being selected is proportional to its score.
It is registered as type weighted-random-picker and runs as a modelselector picker.
What it does
- Receives a list of
ScoredModelcandidates. - If all candidates have a score of zero or less, it delegates to the
random-pickerfor uniform selection. - Uses the A-Res (Algorithm for Reservoir Sampling) algorithm to perform mathematically correct weighted random sampling.
- Generates a random key for each endpoint based on its score: where is a random number in and is the endpoint's score.
- Selects the candidates with the largest keys.
- Returns the top candidate.
Behavioral Intent
This picker resolves the trade-off between max-score-picker and random-picker. It prefers higher-scoring model while maintaining exploration and avoiding extreme hot-spotting.
Inputs consumed
- Consumes the list of
ScoredModelresults and utilizes theScorevalue.
Configuration
The plugin has no config.