This seems like something we could implement as a generic handler for Template calls. There are also many other adaptive sampling algorithms that could likely provide similar or stronger guarantees with fewer samples in more general settings, e.g. those reviewed in https://arxiv.org/abs/2410.23614
Originally posted by @eb8680 in #404 (comment)