SavorIQ — Autonomous Clinical Nutrition & Dining Retrofit Agent
Transforming therapeutic diets into culturally dignified culinary experiences by combining Qloo Taste Intelligence with deterministic clinical safety firewalls.
📌 Problem Statement: Clearly define the unsolved problem you are addressing
Over 130 million Americans live with one or more chronic conditions—such as Congestive Heart Failure, Chronic Kidney Disease (CKD), Type 2 Diabetes, Severe Dysphagia (swallowing disorders), and Hypertension—that mandate rigid, life-or-death dietary boundaries. For these individuals, food ceases to be an emotional comfort and social bond; instead, it becomes a daily clinical minefield.
The current healthcare and food ecosystem fails these patients across three critical dimensions:
The Joy & Cultural Erasure Trap: Standard post-discharge hospital nutrition guidelines are sterile, unpalatable, and overwhelmingly Western-centric. A Cantonese senior recovering from a stroke who requires an IDDSI Level 5 (Minced & Moist) diet is routinely prescribed bland puréed chicken and unseasoned steamed vegetables. The aromatic ginger, scallion, and velveted textures of their ancestral dishes are completely stripped away. This sensory deprivation leads directly to meal refusal, anorexia, clinical malnutrition, and accelerated cognitive and physical decline.
The Social Dining Isolation: When families gather at restaurants, patients with clinical restrictions are functionally excluded. Menus lack crucial allergen cross-contact data, micronutrient ceilings (e.g., sodium, potassium, phosphorus), and texture grading. A patient on Warfarin (Coumadin) anticoagulation therapy must keep Vitamin K consumption strictly constant; a surprise side of collard greens or broccoli rabe can destabilize their International Normalized Ratio (INR), risking fatal thrombosis or hemorrhage.
The Caregiver Execution & Translation Gap: Family caregivers and Home Health Aides are handed discharge summaries packed with dense medical jargon: "Restrict sodium to <1,500 mg/day, maintain strict potassium bounds (<2,000 mg/day for Stage 3b CKD), and ensure particle sizes do not exceed 4 mm with adequate moisture." Caregivers lack culinary training to translate these clinical parameters into actionable grocery lists, home cooking modifications, or explicit instructions for restaurant waitstaff.
💡 Solution: Explain your proposed solution and its unique value
SavorIQ is an autonomous clinical dining and culinary retrofit agent that bridges Qloo’s Cultural Taste Intelligence with a zero-hallucination deterministic clinical safety firewall.
Rather than forcing patients into a depressing culinary box, SavorIQ unlocks their cultural food memories while mathematically enforcing every medical constraint.
Key Value Pillars
Cultural Flavor Memory Anchor Retrieval (Powered by Qloo): SavorIQ queries Qloo's Cultural Taste Graph to map deep sensory affinities. If a patient longs for ancestral dishes (e.g., Caribbean Callaloo, Mexican Birria, Cantonese Steamed Fish, or New York Jewish Deli Pastrami), SavorIQ extracts latent flavor clusters—identifying safe spices, umami profiles, aromatic herbs, and acid balances that recreate nostalgic flavor memories without harmful ingredients.
Decoupled Dual-Engine Architecture (Safety First, Creative Second): Clinical safety is decoupled from generative LLM reasoning. A deterministic TypeScript firewall verifies medical rules (IDDSI texture limits, drug-nutrient interaction matrices, renal electrolyte ceilings) before any recipe or dining modification is finalized. The AI is never permitted to guess or hallucinate medical safety.
Autonomous Restaurant Menu Vision OCR & Retrofit Engine: Users take a photo or upload a PDF of any physical or online restaurant menu. SavorIQ reads the menu, audits every dish against the patient's personalized medical firewall, flags hidden hazards with clinical rationales, and autonomously generates Verbatim Kitchen Modification Scripts that line cooks can follow during dinner rush.
1-Click Caregiver & Dining Suite: SavorIQ translates clinical guidelines into real-world formats:
- Caregiver Fridge Sheet: A high-contrast, large-print, print-ready cheat sheet designed to be magnetically attached to the refrigerator, displaying emergency red flags, IDDSI swallowing limits, and kitchen instructions.
- Waitstaff & Chef Modification Cards: Direct, polite, concise scripts for servers to hand to the kitchen.
- Multi-Channel Dispatch: 1-click WhatsApp and email notification channels ensuring all family members and visiting nurses stay synchronized.
🛠️ Technology Stack
| Architecture Layer | Technologies, Protocols & Frameworks | Description / Role |
|---|---|---|
| Taste Intelligence | Qloo API (/v2/insights, /v2/entities, Taste Graph) |
Fetches cultural affinities, sensory descriptors, flavor cross-domain correlations, and culinary entity URNs. |
| Agentic AI & Vision | Vercel AI SDK, Google Gemini 1.5 Pro / Flash, OpenAI GPT-4o | Multimodal OCR of physical restaurant menus, culinary retrofit synthesis, and kitchen script generation. |
| Clinical Safety Engine | Deterministic Clinical Firewall (Custom TypeScript Engine) | Non-probabilistic rules engine evaluating IDDSI particle sizes, drug-nutrient matrices, sodium/potassium bounds, and allergen cross-contact. |
| Data Validation | Zod 3.x | Strict, end-to-end runtime validation for patient intake schemas, audit requests, and API payloads. |
| Core Framework | Next.js 16.4 (App Router & Turbopack) | Server Actions, Partial Prerendering (PPR), Edge API routes, and optimized streaming. |
| UI & Styling | Tailwind CSS v4, Lucide Icons, Canvas Confetti | Editorial Warm-Parchment design system with WCAG AAA high-contrast accessibility compliance. |
| Caregiver Dispatch | Resend API, Nodemailer, Web Share API | Automated clinical summary delivery to caregivers via email and instant messaging. |
| Export & Print | CSS Paged Media (@media print) |
Formatted physical Caregiver Fridge Sheets with cut lines and magnetic margin layouts. |
| Deployment & CI/CD | Vercel Platform, GitHub Actions | Zero-downtime continuous deployment with custom .npmrc peer-dependency resolution. |
✨ Inspiration
The inspiration behind SavorIQ was deeply personal. We watched aging family members receive devastating clinical diagnoses that immediately stripped them of the foods they had loved for 70 years. When an elder is told they can never again enjoy their mother's Sunday gravy, their hometown street tacos, or their ancestral curries, a piece of their spirit fades.
Modern generative AI has proven adept at writing creative recipes, but medicine demands zero tolerance for error. When we discovered Qloo’s Taste Graph, we recognized the missing link: a cultural intelligence engine that understands why people love the foods they love. By marrying Qloo's cultural empathy with a hard, unyielding clinical safety firewall, we could build an agent that protects life without sacrificing cultural joy.
🚀 What It Does
1. Comprehensive Multimodal Patient Intake
- Captures chronic medical conditions (Congestive Heart Failure, Type 2 Diabetes, Stage 1–5 CKD, Celiac Disease, Hypertension, Dysphagia).
- Logs active pharmaceuticals and automatically maps Drug-Nutrient Interactions (e.g., Warfarin $\rightarrow$ Vitamin K monitoring; ACE Inhibitors/ARBs $\rightarrow$ Potassium limits; MAOIs $\rightarrow$ Tyramine exclusions; Metformin $\rightarrow$ GI tolerance).
- Establishes strict IDDSI Swallowing Levels (Level 3 Liquidised, Level 4 Puréed, Level 5 Minced & Moist $\le 4\text{ mm}$, Level 6 Soft & Bite-Sized $\le 15\text{ mm}$, Level 7 Regular).
- Identifies Cultural Memory Anchors (e.g., "Grew up eating West African Jollof rice, plantains, and pepper soup").
2. Qloo-Driven Cultural Taste Mapping
- Queries Qloo for correlated taste entities, flavor profiles, and seasoning affinities.
- Discovers safe, high-affinity culinary substitutions (e.g., using smoked paprika, roasted garlic, and nutritional yeast to replace high-sodium cured ham hocks in greens).
3. Menu OCR & Instant Clinical Audit
- Caregivers or patients upload a photo or screenshot of any restaurant menu.
- The Vision Engine extracts menu items, ingredients, cooking techniques, and hidden allergens.
- The Clinical Firewall instantly categorizes dishes into:
- 🟢 Safe as Offered: Fits all clinical limits and texture guidelines.
- 🟡 Safe with Modifications: Requires specific kitchen retrofits (e.g., "Steam instead of fry, hold soy glaze, purée sauce separately").
- 🔴 Contraindicated: Poses a direct medical threat with clear, patient-friendly explanations.
4. 1-Click Caregiver & Dining Suite
- Verbatim Kitchen Prep Script: A polite, actionable script for servers and chefs that eliminates ambiguity during busy kitchen shifts.
- 1-Click Caregiver Fridge Sheet: A high-contrast, large-print physical printout formatted for refrigerator magnets, detailing emergency red flags, medication times, and texture particle test instructions.
- Multi-Channel Alerts: WhatsApp, SMS, and email sharing for immediate family coordination.
🏗️ How I Built It
Building the Deterministic Safety Core (
src/lib/clinical-firewall.ts):- Programmed strict, rule-based clinical validation logic that inspects ingredient keywords, preparation methods, and nutritional estimates against medical guidelines (KDIGO renal thresholds, AHA sodium limits, IDDSI framework).
- Guarded every LLM output behind structured Zod schemas to guarantee that hallucinations can never bypass clinical rules.
Integrating the Qloo Cultural Intelligence Engine (
src/lib/qloo-client.ts):- Engineered a robust client targeting Qloo’s API to resolve cultural memory queries into entity URNs.
- Extracted flavor descriptors, seasoning affinities, and related food entities to bridge clinical restrictions with nostalgic food profiles.
Developing the Vision OCR & Culinary Retrofit Pipeline (
src/app/api/vision/route.ts&src/app/api/audit/route.ts):- Deployed multimodal vision models to extract restaurant menu structures from raw images and PDF uploads.
- Built the audit engine to take menu items, run them through the clinical firewall, query Qloo affinities, and generate step-by-step culinary retrofits with precise IDDSI particle guidelines.
Designing an Accessible, Editorial User Experience:
- Crafted an editorial aesthetic inspired by vintage apothecary journals and modern fintech interfaces (
#FBF9F5warm parchment, deep slate ink, jade green clinical indicators). - Ensured full mobile, tablet, and desktop responsiveness with dedicated
@media printlayouts.
- Crafted an editorial aesthetic inspired by vintage apothecary journals and modern fintech interfaces (
⚡ Challenges I Ran Into
Decoupling Clinical Rigor from Generative Creativity:
- Problem: Early tests showed that generative models would occasionally claim small amounts of forbidden items (e.g., high-sodium broth or grapefruit with statins) were "safe in moderation."
- Solution: We completely separated the safety layer from the creative layer. All menu items pass through a deterministic TypeScript firewall first. If an item fails medical bounds, it is hard-blocked or flagged before the creative culinary prompt ever runs.
Translating IDDSI Texture Semantics into Kitchen Actions:
- Problem: A chef in a busy kitchen does not know what "IDDSI Level 5" means in practical terms.
- Solution: We developed an automated translation layer that converts abstract IDDSI levels into concrete kitchen actions: "Dice cooked meat to $\le 4\text{ mm}$ (smaller than fork tines), bind with 2 tbsp warm broth until moist, and ensure no loose liquid separates."
Vercel Build & Strict Dependency Resolution:
- Problem: Next.js 16.4 and Turbopack encountered an
ERESOLVEpeer dependency conflict with ESLint on Vercel's CI/CD. - Solution: Configured
.npmrcwithlegacy-peer-deps=true, alignedeslint-config-nextto16.4.2, and re-audited the dependency lockfile for clean, deterministic builds.
- Problem: Next.js 16.4 and Turbopack encountered an
🏆 Accomplishments That I'm Proud Of
- Zero-Hallucination Clinical Safeguards: Created an architecture where patient safety is mathematically guaranteed by deterministic code rather than probabilistic AI guesses.
- Preserving Cultural Soul: Successfully proved that an elder on a strict cardiac or renal diet can still enjoy the deep, nostalgic flavors of their heritage through intelligent spice and umami mapping.
- The 1-Click Caregiver Fridge Sheet: Bridged the gap between modern digital tools and the physical reality of elder care by generating clean, large-print sheets designed for the refrigerator door.
- Sub-5-Second End-to-End Latency: The complete flow—from menu photo upload, OCR parsing, clinical audit, Qloo taste retrieval, and kitchen script generation—executes in under five seconds on Vercel Edge infrastructure.
📚 What I Learnt
- Taste is a Vital Sign: When food loses its taste and cultural connection, patients stop eating. Restoring flavor dignity is one of the most effective non-pharmacological interventions in geriatric and chronic care.
- The Power of Cultural Knowledge Graphs: Qloo's Cultural Taste Graph unlocked non-obvious culinary bridges demonstrating that cultural affinities can be mapped into safe, alternative ingredients that evoke the exact same sensory memories.
- Safety Demands Architectural Separation: In healthcare AI, generative models should create and synthesize, but deterministic engines must validate and verify.
🔮 What's Next for SavorIQ
- SMART on FHIR Electronic Health Record (EHR) Sync: Integrate directly with Epic and Cerner to automatically update patient dietary parameters from hospital discharge summaries and recent lab results (eGFR, serum potassium, INR).
- Autonomous Delivery App Integration: Deep-link directly into DoorDash, UberEats, and Instacart with pre-populated order notes and modified preparation instructions automatically forwarded to local restaurants.
- Hands-Free Voice Assistant for Caregivers: Provide an interactive voice interface for home health aides and family cooks in the kitchen (e.g., "Alexa / Siri, ask SavorIQ how to modify this tomato sauce for Mom's IDDSI Level 4 diet").
- B2B Licensing for Senior Living & Long-Term Care: Deploy SavorIQ across institutional dining services to dynamically customize tray-line meal assembly for hundreds of residents based on their individual cultural backgrounds and medical charts.
Built With
- accessibility
- api
- artificial-intelligence
- clinical-nutrition
- computer-vision
- dysphagia
- gemini
- healthcare
- healthtech
- iddsi
- machine-learning
- mobile-responsive
- next.js
- ocr
- openai
- qloo
- react
- resend
- tailwindcss
- typescript
- vercel
- vercel-ai-sdk
- web-development
- zod
Log in or sign up for Devpost to join the conversation.