Incrementally improving LLM nutritional estimation in Taralli using DSPy prompt optimization
LLM-based nutritional estimation is difficult to improve without rigorous measurement; relying on subjective 'vibes' makes it impossible to know whether a change helps or hurts the system.
Switching Taralli to Gemini 3 Flash with a few-shot approach yielded ~15% accuracy improvement over the prior production model, and the system now supports fully offline on-device inference.
Frequently asked questions
What did this team achieve with this AI workflow?
Switching Taralli to Gemini 3 Flash with a few-shot approach yielded ~15% accuracy improvement over the prior production model, and the system now supports fully offline on-device inference.
What tools did this team use?
DSPy, MIPROv2, GEPA, OpenRouter, NutriBench, Hugging Face, Gemini 2.5 Flash, Gemini 3 Flash, DeepSeech v3.2.
What results were reported?
NutriBench best model carb accuracy (Acc@7.5): 66.82%; NutriBench best model prompt response rate: ~99%; Taralli best model Accuracy@10%: around 60%; Accuracy improvement over previous production version: ~15% (source-reported, not independently verified).
How is this workflow AI workflow structured?
User submits food description → LLM estimates nutritional content → Accuracy evaluated at threshold → Prompt optimization with DSPy → Production model update.