  A posteriori ratemaking in insurance uses a Bayesian credibility model to
upgrade the current premiums of a contract by taking into account
policyholders' attributes and their claim history. Most data-driven models used
for this task are mathematically intractable, and premiums must be then
obtained through numerical methods such as simulation such MCMC. However, these
methods can be computationally expensive and prohibitive for large portfolios
when applied at the policyholder level. Additionally, these computations become
``black-box" procedures as there is no expression showing how the claim history
of policyholders is used to upgrade their premiums. To address these
challenges, this paper proposes the use of a surrogate modeling approach to
inexpensively derive a closed-form expression for computing the Bayesian
credibility premiums for any given model. As a part of the methodology, the
paper introduces the ``credibility index", which is a summary statistic of a
policyholder's claim history that serves as the main input of the surrogate
model and that is sufficient for several distribution families, including the
exponential dispersion family. As a result, the computational burden of a
posteriori ratemaking for large portfolios is therefore reduced through the
direct evaluation of the closed-form expression, which additionally can provide
a transparent and interpretable way of computing Bayesian premiums.
