M x N categorical outcome matrix with integer entries in
{0,...,C}.
Number of selected samples, with 1 <= k <= N.
Optionalw: readonly number[] | null
Optional reward vector of shape (C+1,). If omitted, R must be
binary and [0, 1] is used.
Average Max@k score across prompts.
Max@k: expected best reward among
ksampled traces.When
w = [0, 1], Max@k reduces exactly to Pass@k. More generally, the reward vectorwmaps categorical outcomes to arbitrary real-valued scores, and Max@k averages the best score obtainable from a subset of sizek.The finite-sample estimator matches Bagirov et al. (2025), Appendix C.1 / Listing 1 (arXiv:2510.23393).