The five-layer accuracy stack
When you log a food in TrakMac, the description doesn't go straight to AI for guessing. It runs through a layered lookup system that uses the most reliable source available before falling back to AI estimation.
The order:
Restaurant cache. If your description matches a menu item from one of the 9 cached restaurant chains (currently includes Chipotle, Sweetgreen, Cava, Starbucks, and others — 2,600+ items), the estimate uses the chain's published nutrition data directly.
USDA database. For single-ingredient items (a banana, 4 oz of chicken breast, a cup of brown rice), the estimate pulls from the USDA FoodData Central database.
Per-user calibration. If you've logged this item before and edited the estimate, your historical corrections inform the new estimate. After 2-3 edits of the same item, the estimate is calibrated to your typical portions and recipe.
Global feedback loop. If many users have logged and edited the same item, those corrections feed into the model's understanding of that food. Your estimate benefits from everyone else's corrections.
AI estimation (Claude Haiku 4.5). If layers 1-4 don't have a confident answer, the description is sent to Claude with your training context (body type, location, typical eating patterns) and an estimate is generated.
For common foods, the early layers handle most queries. For uncommon foods, the system falls through to AI estimation — which is competent but less precise than the cache or database.
What 'unfamiliar' means
A few categories where TrakMac falls back to AI estimation more often:
Regional or ethnic cuisine without standardized recipes. A dish like galbi (Korean BBQ short ribs), biryani (varies enormously by region), menudo (varies by household), or injera with stews falls outside USDA's well-defined entries. The estimate works but has more variance than for standardized American dishes.
Home-cooked recipes unique to your kitchen. Your specific lasagna, your grandmother's stew, your custom protein smoothie — none of these are in any database. The AI estimates based on the typical version of the dish.
Niche brands not in the major chain cache. A local fast-casual chain or a regional restaurant won't be cached. The AI estimates from the description.
Very new products that launched in the last 6-12 months and haven't been added to mainstream nutrition databases yet.
Modified versions of standard dishes. 'Chipotle bowl with extra cheese, no rice, double protein, sour cream' modifies the cached version enough that the estimate may need adjustment.
For these categories, expect ±25-35% accuracy initially, dropping to ±10-15% after 2-3 logs and edits as the per-user calibration kicks in.
How to get a better first estimate on unfamiliar foods
The AI estimator runs on the description you provide. Better descriptions produce better estimates. A few patterns that meaningfully improve accuracy:
Include the protein type and portion
Vague: "Stew" Better: "Beef stew with potatoes and carrots, about 2 cups" Best: "Beef stew with 6 oz beef, 1 cup potatoes, 1/2 cup carrots, in tomato broth"
The more specific you are about protein and portion, the closer the AI estimate lands.
Include preparation method
Vague: "Chicken sandwich" Better: "Grilled chicken sandwich on whole wheat with mayo and lettuce" Best: "Grilled chicken breast (5 oz) sandwich on whole wheat bun with 1 tbsp mayo and lettuce"
Grilled vs fried vs breaded vs sauced is a 200-400 calorie difference for the same nominal dish. State the prep.
Include the brand for restaurant food
Vague: "Chicken bowl" Better: "Chipotle chicken bowl with brown rice and beans" Best: "Chipotle chicken bowl with brown rice, black beans, fajita veggies, salsa, no sour cream, no cheese"
Brand names trigger the restaurant cache lookup. Specific modifications adjust from the baseline cached values.
Use comparables for unusual dishes
Vague: "My usual smoothie" Better: "Smoothie with 1 banana, 1 cup berries, 1 scoop whey protein, 1 cup almond milk, 1 tbsp peanut butter"
If the dish is genuinely unique, breaking it into comparable components produces a more accurate estimate than asking the AI to guess at the recipe.
What to do with the first estimate
For an unfamiliar food, the first estimate is a starting point. The honest accuracy:
- Restaurant cache hit: ±5-10%
- USDA database hit: ±10-15%
- AI fallback on familiar territory: ±15-25%
- AI fallback on unfamiliar territory: ±25-35%
After logging, evaluate whether the estimate looks reasonable. If it's clearly off:
- Edit the macros to your best knowledge of the actual values
- Save
- Use a consistent name for the food when you log it next time
The per-user calibration uses the description text as a key. Logging the same dish under varying descriptions ('homemade lasagna' one week, 'lasagna' the next, 'beef lasagna' the third) prevents the calibration from compounding. Pick a stable description for foods you eat regularly.
When the AI is genuinely guessing
A few signs that the estimate is more guess than calculation:
- The macros look round (e.g., calories at 500, protein at 25g, exact-tens for carbs and fat) — often the model defaulted to typical values
- The confidence score (visible on the entry detail) shows 'low'
- The description was very brief or very complex
- The food category is one the model has limited training on
For these, your first edit teaches the system more than for high-confidence estimates. The system specifically tracks low-confidence estimates that get edited and uses them to update the model's understanding of that food category.
What about completely novel foods?
Sometimes the AI gets a description it has no good basis for. Examples: a brand-new protein product, a regional dish from somewhere with limited online nutrition information, a custom recipe with unusual ingredients.
For these, the estimate is essentially a sophisticated guess. The system will often return values within the right order of magnitude (it knows that 'protein bar' is in the 200-300 calorie range with 20-25g protein, even if it doesn't know your specific brand) but the precision is low.
The right move:
- Look up the actual nutrition information (the package label, a recipe blog, the manufacturer's website)
- Edit the entry to the actual values
- Note the brand or recipe in the description for future logs
After the second or third log of a novel food, the per-user calibration usually has it dialed in.
What TrakMac is actively improving
The accuracy stack is not static. Three ongoing investments:
Restaurant cache expansion. New chains get added based on user logging volume. If you log a chain 10+ times, it's a candidate for cache addition.
Global feedback loop refinement. When many users edit the same item the same way, the model updates. This produces measurable accuracy improvements over months.
Per-user calibration tuning. The personalization layer is being refined to recognize your specific eating patterns more quickly — fewer logs needed before estimates calibrate to you.
The live accuracy metric is published at trakmac.com/admin/accuracy if you want to see the current performance.
What this all means for you
TrakMac is good at common foods, decent at uncommon foods, and learns your specific eating patterns over time. For an unfamiliar food, the first estimate may be ±25-35% off. After 2-3 logs and edits, it drops to ±10-15%. The system gets better the more you use it, both for you specifically and for everyone.
The practical version: log freely, edit when the estimate is clearly wrong, use consistent descriptions for repeat foods. The accuracy stack handles the rest.
