How do we provide our growing global population with healthy diets, in ways that don’t harm the planet?

Whether you live to eat or eat to live, you should probably know what’s happening deep inside your gut.

At least, that’s what scientists out of the Mayo Clinic are finding from new research into the effectiveness of using the particulars of the human gut microbiome to figure out the healthiest diets for individual people.

A study published Feb. 8 in the Journal of the American Medical Association bolsters a still-emerging area in diet science that suggests the best way to manage nutritional health is to build personalized diets. For a long time, people have sought to build diets based on the nutritional compositions of the foods they eat. Just think about the US government’s food pyramid, which suggested daily servings of meats, vegetables, fruits, and grains to maintain good health. But as nutrition science and technology have evolved, we’ve gained more insight into what’s happening on a chemical level inside our bodies. As a result, some scientists, dietitians, and food companies are beginning to shift focus away from the general properties of specific foods, and towards how our individual bodies process them.

It’s a dieting method that treats each human body less as a template, and more as a highly unique ecosystem. Ultimately, it suggests there is no one-size-fits-all diet.

The new Mayo Clinic research offers evidence for the viability of that approach from the standpoint of managing blood sugar levels. The researchers built a model for predicting how different foods impact people’s blood sugar levels, then they set out to test that model. What they found was that by analyzing a person’s gut microbiome, age, level of physical exercise, and other factors, they could very accurately predict how the body reacts to food; more so than if they attempted to do so by counting calories or carbs.

“As a clinician, I have seen that my patients do not respond to the same foods the same way—just like not all weight-loss diets work for all people the same,” said Heidi Nelson, one of the study’s co-authors, in a statement.

As part of their research, the scientists followed 327 healthy people for six days. Each person submitted stool samples so that the scientists could figure out the unique microbial makeups of their guts. They also kept diaries of what they ate each day, taking care to note the exercise and rest they got. They were also outfitted with blood-glucose monitors that tracked their glycemic responses to food. Once the researches collected those data, they tested the results against the model they built for predicting glycemic reactions to foods.

According to the study, the model was able to accurately predict blood-sugar changes 62% of the time. Previously, when only predicting based off carbs or calorie intake, they were able to accurately guess fluctuations 40% and 32% of the time, respectively.

“With our individualized model, people no longer have to give up all foods within a certain category,” said researcher Purna Kashyap, in a statement. “It allows them to choose specific foods within certain categories that fit well with their microbiome.”

One participant in the study described how he learned that he didn’t need to give up all carbohydrates to cut down on his blood sugar levels. The data collected by the model showed him he needed only to eat less rice and wheat grains while eating more eggs and cottage cheese.

“And I’m staying away from sugary breakfast cereals and yogurts,” he wrote on a Mayo Clinic release. “I’ve lost a little bit of weight and I feel more energetic.”

The work supports the findings of a similar study from 2015 conducted by the Weizmann Institute of Science in Israel. As a body of evidence develops in the field of personalized nutrition, it will likely be incorporated into new products that food companies make. Nestlé, the world’s largest food company, is already testing personalized dieting in Japan, part of the company’s longer-term vision that blurs the line between food and pharma.