But the advice is likely to be ignored by much of the I’ll-have-fries-with-that citizenry. Moreover, recent scientific findings are beginning to lend support to a new approach to diet, one personalized to the individual.

Research increasingly suggests that each of us is unique in the way we absorb and metabolize nutrients. This dawning realization has scientists, and entrepreneurs, scrambling to provide more effective nutritional advice based on such distinguishing factors as genetic makeup, gut bacteria, body type and chemical exposures.

“The same dietary advice cannot be good for everyone, because we are all different,” said Eran Elinav, an immunologist at the Weizmann Institute of Science in Rehovot, Israel. “This is why we have failed so miserably at controlling the obesity epidemic.”

Dr. Elinav and his colleagues are hoping to build a new kind of diet-counseling business from findings they published recently in the journal Cell. Their study found a startling variation in the glucose responses of 800 subjects fed the same foods. Some participants had sharp increases in blood sugar when they ate ice cream and chocolate, while others showed only a flat or moderate response.

Wild variations also occurred when the subjects ate foods like sushi and whole-grain bread, making a mockery of the glycemic index, long used to rank foods according to their effects on blood sugar, and calling into question the reliability of calorie calculations. Each person’s capacity to extract energy from foods differs, it appears.

But the Weizmann team took their findings a step further.

By combining data gleaned from subjects’ glucose responses with information about their gut bacteria, medications, family histories and lifestyles, the scientists devised an algorithm that accurately predicted blood sugar responses to foods the participants hadn’t yet eaten in the study.

Further, with the algorithm the scientists were able to prescribe personalized diets to a group of 100 prediabetic patients that significantly moderated their blood sugar following meals and boosted levels of good bacteria in their guts.

“The algorithm is similar to what Amazon uses to tell you which books you want to read,” said Eran Segal, a computer scientist at the Weizmann Institute and co-author of the study. “We just do it with food.”

Although they have more fine-tuning to do, Dr. Segal said his group hope to eventually use this algorithm to customize dietary advice to the public. Indeed, personalized nutritional counseling is a burgeoning field. Several companies, including Vitagene, Nutrigenomix and DNAFit, are already offering individualized dietary counseling.

Their efforts are based mostly on genetic testing, but scientists have only just begun to explore the links between DNA and good nutrition. “I think companies offering personalized dietary advice are probably running ahead of the evidence,” said John Mathers, director of the Human Nutrition Research Center at Newcastle University in Britain.

More research is needed, he and other experts say, because the interactions among one’s genes, microbiome, diet, environment and lifestyle are so infinitely complex.

Scientists are beginning to tease out the connections. Studies have linked at least 38 genes to nutrient metabolism — variants of which are thought to hinder or help absorption or the efficient use of nutrients in foods. Depending on your genetic makeup, studies suggest you might want to consume more or less folate, choline, vitamin C, fatty acids, starches and caffeine.

“We’re starting to see what links there are between food, microbiota, individual genetic makeup and our health,” Dr. Mathers said. “These different lines of work are beginning to come together now partly because we have the technology to cope with the big data issues.”

Dr. Mathers is the lead investigator of a six-month study, funded by the European Union, called Food4Me. Some 1,500 participants in seven European countries were randomly given personalized dietary advice based on their genetic data, or told to follow standard dietary prescriptions like eating lots of fruits and vegetables, lean meats and whole grains.

While the results haven’t been published yet, Dr. Mathers said, “the bottom line is those who were in the personalized diet cohort did better than those in the one-size-fits-all diet group, making us pretty confident personalized diets are the way forward.”

Still, gene expression, the microbiome and other factors used to personalize diets are not immutable: They may be altered not only by foods, but also by factors like stress and chemical exposures, changing by the year, month or even week.

Companies that provide personalized dietary counseling counter that there is at least enough evidence to improve upon all-purpose dietary recommendations, which have proved largely unsuccessful.

Ahmed El-Sohemy, an associate professor and nutrigenomics researcher at the University of Toronto and a co-founder of Nutrigenomix, offered coffee as an example. Current guidelines advise no more than four or five cups per day.

“That’s fine for roughly half the population that are fast metabolizers,” he said. “For the other half who have a variant of the CYP1A2 gene, any more than two cups per day will increase the risk of a heart attack and hypertension.”

Companies like Nutrigenomix tend to offer mostly nutritional advice, rather than diets to treat specific diseases, and therefore the Food and Drug Administration does not regulate this new and potentially lucrative business. (Enforcement would be tough anyway, as many providers are based in other countries.)

So buyers beware. Discuss any prescribed dietary changes with a doctor or registered dietitian.

Tellingly, many of the experts who champion the future of personalized nutrition have not been genetically tested themselves, nor have they had their own microbiota analyzed.