Engineering MoodBite.Ai
MoodBite is an explainable, constraint-aware culinary recommendation engine designed to regulate psychological states through dietary intervention. Unlike generic LLM wrappers, MoodBite runs a deterministic 12-layer pipeline that combines an Emotional Vector Machine (EVM), clause-level negation parsing, hard constraint safety, and multi-factor ranking—100% locally with zero paid API dependencies.
Intent-Gated Boundaries
MoodBite refuses to hallucinate arbitrary food for off-topic inquiries or gibberish. Every input passes strict intent gates.
Strict Hard Constraints
Vegetarian, vegan, and allergy filters are strictly deterministic filters, never soft score increments. Forbidden foods are pruned immediately.
<3ms Local Computation
Zero third-party telemetry, zero external token costs, and 100% offline functionality powered by local client & edge execution.
Wellness & System Scope
MoodBite analyzes linguistic markers to suggest comfort and nourishment. It is an ambient wellness recommendation system, not a clinical psychiatric or medical diagnosis tool.
12-Layer System Architecture
Input & Intent Gate
Validates queries before emotion analysis. Categorizes into MOOD, FOOD_REQUEST, GREETING, OFF_TOPIC, or UNKNOWN so random text never triggers hallucinated meals.
Clause & Negation Engine
Splits multi-clause sentences at punctuation and contrastive markers ('but', 'however'). Resolves negation scopes ('not sad', 'no longer stressed') accurately.
Canonical Emotion Ontology
Maps linguistic signals into an 11-class canonical ontology (joy, sadness, anger, fear, stress, calm, excitement, boredom, loneliness, neutral, unknown).
Calibrated Confidence
Derives confidence from expert agreement, signal separation, and clause intensity. Low-confidence inputs safely trigger an AMBIGUOUS clarification state.
Hard Constraint Extraction
Extracts dietary rules (vegetarian, vegan, non-veg, Jain), availability channels (home, market, restaurant, delivery), and spice preferences from query and profile.
Rich Culinary Knowledge
Curated dataset of 25+ rich food profiles featuring mood affinities, nutritional balance, spice profiles, prep times, and availability tags.
Deterministic Hard Filtering
Strictly eliminates any candidate violating dietary restrictions or availability channels. Vegetarian never receives meat. Hard rules always win.
Multi-Factor Scoring & Ranking
Scores remaining candidates across emotion affinity (0.35), comfort fit (0.20), energy/digestion (0.15), variety bonus (0.10), and user feedback boost (0.10).
Hero & Curated Alternatives
Selects the highest-ranking candidate as Hero recommendation and preserves distinct alternative candidates spanning different preparation avenues.
Explainable Chef's Logic
Generates clear, transparent rationales breaking down why the meal was chosen, its physiological intervention, and the emotional vector physics.
Adaptive Glassmorphism UI
Renders real-time dynamic ambient lighting reflecting the detected mood, multi-axis vector radar chart, hero cards, and one-click quick starters.
Privacy-First Personalization
100% local-first data storage. Taste feedback, mood trajectories, and dietary settings remain in your browser with full anonymous guest mode support.
Evaluation Benchmarks
Every subsystem change is benchmarked against real linguistic and constraint test suites without using external cloud services.
Verified Production Test Cases
| User Query | Mood | Intervention Strategy | Food Recommendation | Explainability & Gate |
|---|---|---|---|---|
| "My exam is tomorrow and I haven't studied anything." | Stress | Calming Warmth & Focus | Masala Chai / Moong Dal Khichdi | Contextual academic anxiety detected without direct keywords. Calming warmth lowers cortisol. |
| "I am not sad at all, actually had a wonderful day!" | Joy | Celebration & Reward | Vegetable Biryani | Negation engine resolved 'not sad' and prioritized positive clause 'wonderful day'. |
| "I'm feeling down and need comfort, but I am strictly vegan." | Sadness | Grounding Comfort | Dal Tadka with Steamed Rice | Hard constraint enforced: dairy/ghee excluded. Warm, protein-rich lentils provide serotonin support. |
| "I am furious about my flight delay!" | Anger | Sensory Release | Spicy Chaat / Pav Bhaji | High-arousal frustration balanced with endorphin-releasing capsicum and bold spices. |
| "What is Python?" | Neutral | Intent Guardrail | Clarification Guide | Off-topic gate triggered. Explains culinary scope without hallucinating meals. |
| "Hey" | Neutral | Greeting Welcome | Interactive Prompts | Recognized conversational greeting. Welcomes user and offers instant starter prompts. |
| "cxkvkxv" | Unknown | Disambiguation | I Didn't Quite Catch That | Low lexical entropy detected. Prompts user for clarification without guessing. |
Mobile App & Offline PWA
MoodBite.Ai is fully progressive-web-app (PWA) compliant. You can install it on iOS, Android, macOS, and Windows for an app-like experience with instant launch speeds and offline caching.
Install MoodBite.Ai on Your Device
Enjoy instant launch speeds, offline capability, zero battery drain, and full-screen access directly from your phone, tablet, or laptop desktop.