NutrientAutocomplete

Fill in the rest

Type a food and its calories. Enter any values you already know. The model predicts every field you left blank, from the name alone.

Calories is required: the model predicts composition per calorie, so it needs the scale from you. Nothing else is required.

Leave blank to have it predicted. Filled fields are shown as yours, and are also fed to the model.

Nutrition

NutrientAmountSource Model R² on unseen food

This demo is a smaller model than the one we measured. The real model is a 118M-parameter transformer that reaches median R² 0.781 on food it has never seen. It cannot run in a web page, so this ships a distilled version: 1.16 MB of TF-IDF and ridge coefficients, median R² 0.615.

So the demo is about 0.17 R² worse than our result. The per-nutrient figures in the last column are this model's, not the big one's.

Where the numbers come from

Training data
3,849,644 public reference foods (USDA FoodData Central, public domain; Open Food Facts, ODbL) and 2,861,944 meal logs from 7 nutrition apps. Public and Terra values were calibrated against each other on 31,081 shared food names before training; 14 of 15 nutrients agreed to a ratio of 1.000, and vitamin A was excluded for failing that check.
What it predicts
Nutrient density per 1000 kcal, then multiplied by your calorie figure. Density is the quantity that agrees across apps: for the same food name, two apps' raw values differ by about 1.5×, their per-calorie densities by 0.1%.
How it was scored
On food names that appear nowhere in training. A random split would let the same name sit on both sides and would flatter these numbers by roughly 0.05 to 0.10 R².
Exact matches
3,000 common food names carry a stored median from the training data. When your text matches one, the row is marked table and no model runs. Everything else is predicted from the text.
Arithmetic, not prediction
Calories are approximately 4×protein + 4×carbohydrate + 9×fat, which holds within 10% on 82.6% of meals. Where you supply calories and two of those three macros, the third is solved rather than predicted, and marked solved.