Beer clearly tastes just fine the way it is; it’s the world’s most popular alcoholic beverage for a reason. But according to a study by researchers at Belgium’s KU Leuven (Katholieke Universiteit Leuven), AI could have the potential to make brews taste even better.

For the study, published in peer-reviewed journal Nature Communications, researchers analyzed over 200 chemical compounds in 250 commercial Belgian beers across 22 styles in order to train machine learning models (a form of artificial intelligence) to predict flavor and consumer appreciation.

“Beer — like most food products — contains hundreds of different aroma molecules that get picked up by our tongue and nose, and our brain then integrates these into one picture,” research leader Professor Kevin Verstrepen told The Guardian. “However, the compounds interact with each other, so how we perceive one depends on the concentrations of the others.”

In addition to measuring alcohol content, pH level, and sugar concentration, the research team also examined terpenoids (which are responsible for herbal and fruit flavors), yeast metabolites like esters, and other compounds derived from malt and bacteria. To bolster their learning models, a tasting panel of 16 participants scored each of the beer samples based on sweetness, hop flavor, and acidity to provide data on consumer appreciation. Data was also collected from 180,000 consumer reviews on the online rating platform RateBeer to compare their ratings and comments with the panel’s preferences.

The Belgian scientists then trained 10 different learning models to analyze the information and predict how a beer would taste based on its compounds, and thus how much it would be appreciated among consumers. The AI systems revealed that, when it comes to a beer’s taste, a small change in a chemical’s composition can have a large impact on the resulting brew’s flavor.

As Verstrepen told The Guardian, the team was surprised to see that a few compounds believed to be less appealing to consumers could actually make a beer taste better if present in low concentrations and in harmony with other desirable aromas.

The team used the results from the systems to reformulate an existing brew used in the study, adding in compounds that were flagged as being predictors of consumer appreciation, like glycerol and lactic acid — and it apparently works. According to the results of the study, these enhancements improved perception of both alcoholic and non-alcoholic beers across several categories including body, sweetness, and overall appreciation.

While it’s a solid advancement in brewing refinement, Verstrepen says that at the end of the day, it’s still down to the brewers’ skill when it comes to crafting a great beer.

“The AI models predict the chemical changes that could optimize a beer,” he explains. “But it is still up to brewers to make that happen starting from the recipe and brewing methods.”