Gains:
- Ability to understand the necessity of obtaining nutritional values from well-known databases (USDA, TÜBER, BeBiS) rather than from artificial intelligence memory
- Ability to direct artificial intelligence to make calculations and interpretations only with the data drawn from the source, with RAG logic
- Ability to prevent nutritional errors by considering raw/cooked conversions, portion clarity and source consistency
At the heart of a dietitian's daily work is the question "how much is in this nutrient?" There is a question. How many grams of protein in 100 grams of chicken breast? How many grams of fiber are in a slice of whole wheat bread? How many calories are in a tablespoon of olive oil? The answers to these questions are held in food composition databases — official tables that list the energy, macro and micronutrient content of thousands of foods based on laboratory analysis. The most dangerous mistake of artificial intelligence in this field is to think that it "remembers" these numbers. However, the language model does not memorize numbers; It generates probabilistically and often gives values that are close to reality but sometimes seriously wrong. The main message of this unit is clear: get the nutritional value from a recognized database, not from the AI's memory; Use AI to work with accurate data, not to remember data.
Well-known databases and what they are used for
The main sources widely used in the world and in Türkiye are:
database
Scope
strong point
Attention
USDA FoodData Central (USA)
Very large, ~quarter million records
Detailed, free, with API
USA products; local food limited
TÜBER / Türkiye Nutrition Guide supplements
Turkish cuisine focused
Local food and portion
Scope narrower than USDA
BeBiS (Nutrition Information System)
Common software in Türkiye
Turkish recipes
Licensed software
USDA/EuroFIR
European composition data
Country based standard
Access can be institutional
What is meant by "API" is the interface that allows a software to programmatically (automatically) ask questions to the database and receive structured answers. Having an API for resources like USDA FoodData Central makes it possible to connect AI tools to real data in the future. This is the basis of the “data-driven AI” approach: do not fit models, draw from the real source.
Attention: The same nutrient may show different values in different databases; Because the farming condition, variety, cooking method and analysis are different. There is no single "correct" number; There is a reasonable range. Record which resource you use in a client plan so you can be consistent.
"Retrieval" logic: connecting the AI to the source
In modern applications, the way to connect AI to real data is the RAG approach — Retrieval-Augmented Generation in English. Simply: instead of fitting the answer from memory, the model first pulls relevant data from a reliable source (database, document), then generates an answer based on that data. In practice you implement this in two ways:
- Manual feeding: You copy the values of the food from the trusted table and give it to the AI; AI only calculates/interprets with this data, it does not add numbers from its own memory.
- Connected vehicle: You use a database-connected vehicle; The AI forwards the query to the actual source and uses the returned value.
In both cases, the golden rule is the same: the number comes from the source, the AI interprets it. "How much iron is in 100 grams of lentils?" asked YZ. To ask an open-ended question is to invite fabrication.
Generic product, branded product and meal mix
Nutrient databases have multiple records under the same name, and selecting the wrong record is a silent source of error. For example, searching for “yogurt” will give you dozens of different records, such as full-fat, half-fat, fat-free, Greek-type (strained), and sweetened fruit yogurt; Their calories and macros are very far from each other. Greek yogurt has almost twice the protein of regular yogurt. Similarly, "branded product" records (a company's packaged product) and "general nutrition" records carry different values. In good practice, you match the product the client actually consumes as closely as possible: if possible, based on the nutrition label on the packaging, otherwise you choose the closest description in the database. Ask the AI "which record should I choose?" When you consult, it can suggest you the right search term; but the final record selection and comparison to the label is under your control. Using the same record for the same nutrient throughout a plan is also important for consistency; Using full-fat milk half the time and skim milk half the time will distort the totals.
Portion and cooking conversions
Nutritional databases usually give values per 100 grams raw. But the client eats cooked lentils, not raw lentils. The weight changes by absorbing water during cooking; 100 grams of raw rice increases to ~250-300 grams when cooked. Therefore, "cooked 200 grams" and "raw 100 grams" have different nutritional values. AI can make these transformations, but it can confuse the direction. Always clarify whether the value you use is raw or cooked; this is a frequent source of calculation errors.
three mini cases
Case 1 — Catching a hallucination. A dietitian asked YZ, "How many grams of protein are in 100 grams of boiled broccoli?" he asks; AI says "about 8 grams". The dietitian looks at the USDA: actual value is ~2.4 grams. AI mixed it with legume/nut data and inflated it threefold. The dietitian uses the correct value. Lesson: green vegetables are low in protein; The number is not correct just because it is fluent.
Case 2 — Raw/cooked confusion. In a draft plan, the AI uses the raw value for “150 grams of pasta” (~525 kcal), whereas the client is eating 150 grams of cooked pasta (~210 kcal). The difference is 315 kcal in one meal, which is a serious deviation even with one meal a day. The dietitian clarifies the unit of measurement to "cooked" and recalculates.
Case 3 — Correct use. A dietitian copies the 100-gram values for chicken, rice, and broccoli from the USDA, giving them to the AI with the instruction to “just calculate the total macro for a meal with this data, adding numbers from its own memory.” AI only adds with given numbers; the dietitian confirms by slamming it back. Data came from the source, AI did the arithmetic.
Copiable prompt templates
CALCULATION TEMPLATE WITH SOURCE DATA (RAG logic)Your role: assistant who works only with the nutritional values GIVEN TO YOU.ADD or CHANGE nutritional values from your own memory. If missing data write "[no data]", make up. Data (per 100 g, source: USDA):- Chicken breast (cooked): 165 kcal, 31 g protein, 3.6 g fat, 0 g carbs- Rice (cooked): ...Task: Calculate the total kcal and macro for 120 g chicken + 150 g rice.
RAW/COOKED CONVERSION TEMPLATEThe value of the following food is given per 100 g RAW: [values]. The client eats [X] g COOKED. When cooked, the weight ~[ratio]changes. Accordingly, calculate the nutritional value of the amount eaten and write CLEARLY which assumption you use.
DATABASE QUERY PREPARATION TEMPLATEI want to find the nutritional value of a meal. List WHICH term I should search in the food database (USDA/TUBER) for the following foods, which record I should choose, raw/cooked. Don't give the values to YOU; just tell me the correct search term and point of attention.Nutrients: [...]
CONSISTENCY CHECK TEMPLATEInterpret the nutritional values for the following meal in two different ways: (1) assuming all foods are raw, (2) assuming all foods are cooked. Compare the two totals and explain where the difference comes from. So I can see which assumption I need to verify.
Weak prompt / Strong prompt
Weak prompt:
How many calories are in a bowl of lentil soup?
"A dish" is vague, the recipe is vague, the source is absent; The AI makes up a number from its memory and doesn't say how it came up with it.
Powerful prompt:
Your role: assistant who only calculates with the given data. Lentil soup serving = 300 g. Ingredients (values per 100 g, source USDA, I give below): red lentils (cooked) [values], onion [values], olive oil [values]. Quantities per serving: [...]. Calculate total kcal and macro with this data, do not add from memory, show steps.
The second prompt source gives the serving, raw/cooked information, and the "do not add" constraint; The output is auditable and reliable.
Common mistakes
- Trusting the AI's memory: Open-ended questioning of nutritional value; This is an invitation to hallucination.
- Confusing raw/cooked: The most common silent mistake; Always clarify the unit of measurement.
- Source confusion: Mixing different nutrients from different databases; Use consistent resources in a plan.
- Leaving the portion vague: Calculating expressions such as "a plate", "a handful" without converting them into grams.
- Focusing on a single number instead of a range: Forgetting that the same food has a reasonable range of values; creating false certainty.
In summary
Nutritional data is the area where the language model is weakest; Because the model doesn't remember the numbers, it produces them. So always get the nutritional values from a recognized database (USDA, TÜBER, BeBiS) and use the AI to calculate and interpret only that data — based on RAG logic, data pulled from the source. Pay attention to raw/cooked conversions, portion clarity, and source consistency. Just because the number came out fluent is not correct; You can only get the truth by working with the source.
Application task
Choose three foods (for example, boiled eggs, whole wheat bread, Greek yogurt). First, ask the AI open-ended and get its values (from its memory). Then find the actual values of those same nutrients from USDA FoodData Central. Compare the two sets and write down in a table how much deviation there is in each food. This table will reveal the principle of "don't trust memory, link to source".
checklist
- [ ] I got the nutritional values from a well-known database, not from the AI memory.
- [ ] I put the restriction on AI to "work only with the given data, do not add anything".
- [ ] I have clarified for each food whether it is raw or cooked.
- [ ] I converted the portions into grams; I didn't leave "a plate/handful" behind.
- [ ] I used a single consistent source within a plan.
- [ ] I verified the AI's sum by multiplying it back.