New LLM pipeline achieves 98.4% accuracy on nutrient data at $1/ingredient
Repeated LLM queries and statistical guards cut nutrient ratio errors by 68%
A team of researchers from De Montfort University and University Hospital Southampton have proposed a statistically supported pipeline that leverages multiple LLM calls to reliably collect ingredient and recipe data for computational nutrition. The method addresses the unreliability of single-pass LLM outputs by treating each query as a sample from an answer distribution, then applying robust point estimators and normalized confidence scores across numerical, Boolean, multiple-choice, open categorical, and optional integer types. An invariant guard layer enforces self-consistency within each ingredient record, while minor numeric inconsistencies are reconciled via a linear program that minimizes worst-case percentage deviation without distorting semantic zeros. Major violations trigger web-evidence-grounded repair, with human review only as a last resort.
On a curated 30-ingredient reference set, the pipeline achieved 98.4% exact match on nutrient flags and slashed median absolute percentage error on nutrient ratios from 31.9% (median-aggregated baseline) to 10.1%—a 68% reduction. The authors also fit a Heap's Law curve to 233 recipes, showing unique-ingredient growth is sub-linear and front-loaded (ratio drops from 1.74 at 100 recipes to 0.19 at 5,000). At an API cost of roughly $1 per ingredient, the approach frames LLM-assisted database construction as a controlled data-engineering workflow that operationalizes uncertainty rather than discarding it. This could enable automated reasoning systems to rely on more complete and consistent nutrition databases for healthcare, food tracking, and diet planning applications.
- 98.4% exact match on nutrient flags and 68% reduction in nutrient ratio error (31.9% → 10.1% median absolute percentage error)
- Pipeline cost approximately $1 per ingredient using repeated LLM queries and statistical estimators
- Heap's Law analysis shows unique ingredient growth is sub-linear, dropping from 1.74 ratio at 100 recipes to 0.19 at 5,000 recipes
Why It Matters
Reliable, cost-effective nutrition data pipelines enable AI-driven food tracking and healthcare automation with quantified uncertainty.