Moving chocolate pudding from kiddie fare to sophisticated sweet is all about balance, a lesson we long ago learned to appreciate from the perfect pairing of salt and caramel.

But a simple sprinkle of salt didn’t deliver the savory notes needed to balance our chocolate pudding, a dessert practically defined by its cloyingly sweet nature.

For that, we needed something with richer, deeper savory notes. On face value, our solution seems an unlikely one: white miso. Except this fermented soy paste—traditionally used in soups and sauces—sports a naturally sweet side along with umami, allowing it to lean in both directions.

In this recipe, we draw on both facets of miso’s flavor profile to provide a sweet-and-savory base for our pudding. Once dissolved with a bit of warm water, the miso is easily stirred into an otherwise familiar custard of egg yolks, cornstarch, milk and cocoa powder (ideally Dutch-processed for additional depth, though any variety works well in this dessert).

For extra complexity, we also caramelize the sugar and brown the butter to create a rich butterscotch that pairs beautifully with the miso and chocolate. The perfect pudding thanks to perfect balance.