Completed, Dissertation
Nourish Neural
Does a heterogeneous ML ensemble plus a local LLM agent make a more useful food waste tool than either alone?
98%
Ensemble classification accuracy on 10,000 synthetic samples
94.9%
MobileNetV3-Large test accuracy across 8 categories
19
Automated end-to-end tests, 100% pass rate
81.3
SUS usability score from a small study (n=3)
Problem
Food waste often starts with things people forget they bought. Perishability, days since purchase and category decide what goes off first, and most tools ignore all three. The research question was whether combining a heterogeneous ML ensemble with a locally hosted LLM agent makes a more useful tool than either part alone.
Approach
- A weighted ensemble of Random Forest (40%), Gradient Boosting (30%) and a Neural Network (30%) classifies waste risk. It was trained on 10,000 synthetic samples built from UK food safety guidelines.
- A MobileNetV3-Large model recognises food items across 8 categories.
- A Llama 3.2 ReAct agent uses RAG and five pantry-aware tool calls to answer questions about what is in the pantry and what to do with it.
- All inference runs on the device, so pantry data never leaves it.
Architecture
Select a component to see what it does. All inference runs on the device.
Pantry input
Pantry items are entered with a category and purchase date. These feed the waste-risk ensemble.
- Feature importance showed perishability, days since purchase and category as the dominant waste predictors.
- Frontend in React and TypeScript. Backend in FastAPI.
Limitations
- The 98% accuracy was measured on synthetic data. It has not been validated against real household pantry logs.
- The usability score comes from three participants. Treat it as directional, not conclusive.
- Ablation analysis tested the ensemble weights, and fallback degradation was tested for when a component fails. Results are specific to this dataset.
Stack
- Python
- TypeScript
- React
- FastAPI
- PyTorch
- scikit-learn
- Ollama
- Llama 3.2 via Ollama
- RAG
- Tool use and function calling