Proudly Built for Infinity AI Buildfest 2026 @ BRAC University Web Application: Deployed at Vercel & Railway.
DesiDiet is an enterprise-grade, culturally grounded, clinical nutrition and meal planning ecosystem engineered to solve the unique dietary health challenges of the Bangladeshi and South Asian population.
Traditional nutrition applications fail in South Asia. They do not comprehend regional foods (e.g., Shak, Ruti, Dal, regional fish), nor do they clinically account for the high genetic predisposition to metabolic conditions like Type-2 Diabetes, Hypertension, and Micronutrient Deficiency (Anemia) prevalent in Bangladesh.
DesiDiet introduces a 5-Layer AI Reference Architecture powered by a dual-agent framework (Pusti AI & NutriSaathi) orchestrated via LangGraph. The platform enforces strict medical compliance by grounding Large Language Models using a state-of-the-art Hybrid RAG engine backed by three core clinical data sources: the National Dietary Guidelines for Bangladesh, the Bangladeshi Food Composition Tables (FCT), and the clinical structures of the Explainable GraphRAG Framework (Dindukurthi et al., 2026).
DesiDiet addresses the critical shortage of practicing nutritionists in Bangladesh by providing scalable, expert-grounded clinical guidance. The platform aims to improve regional nutrition awareness, prevent metabolic diseases, and expand accessibility to personalized dietary support both locally and beyond borders.
Target Audience![]() |
DesiDiet is designed around an AI-Native 5-Layer model that decouples integration, business logic, semantic optimization, and knowledge databases:
DesiDiet is powered by a diverse ingestion layer combining peer-reviewed data sources, relational inputs, and validated synthetic sets:
- Open Datasets: Grounded in the National Dietary Guidelines for Bangladesh, Bangladeshi Food Composition Tables (FCT), and clinical schemas adapted from the peer-reviewed study, An Explainable GraphRAG Framework for Personalized Nutrition Recommendation (Dindukurthi et al., 2026).
- External APIs: OpenAI API (used for Whispering voice inputs and chat orchestration) and Pinecone Vector Database (hosting indexed recipe data).
- Internal Systems: PostgreSQL relational database (via Prisma ORM) storing user profiles, logs, and targets, and a Neo4j Graph Database mapping complex food, nutrient, and disease relationships.
- Synthetic Data: Automatically generated and updated food compatibility/pairing matrices, validated programmatically via AST structures.
Our mobile-first web app is designed for accessibility on the go, bringing intelligent nutrition straight to the palm of your hand.
| 1. Mobile Dashboard | 2. Daily Meal Tracking | 3. Pushti-AI Assistant | 4. Target Goals & BMI |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
| 5. Health & Disease Setup | 6. User Profile & Metrics | 7. Pro Upgrade Flow | 8. Health PDF Reports |
![]() |
![]() |
![]() |
![]() |
Chat directly with Pushti AI on WhatsApp without installing any app! Log meals, ask for advice, and get full dietary planning right from your favorite messaging app.
| 1. WhatsApp Meal Plans | 2. WhatsApp Meal Logs | 3. WhatsApp Nutrition Info | 4. WhatsApp Health Advice |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
DesiDiet uses native South Asian nutritional formulas, structured compatibility rules, and a multi-stage workflow:
- Basal Metabolic Rate (BMR) Formulas (Mifflin-St Jeor Equation):
- Male:
BMR = (10 * Weight) + (6.25 * Height) - (5 * Age) + 5 - Female:
BMR = (10 * Weight) + (6.25 * Height) - (5 * Age) - 161
- Male:
- Total Daily Energy Expenditure (TDEE):
TDEE = BMR * Activity Factor - Adjusted South-Asian BMI Categories:
- Underweight:
< 18.5 - Normal Weight:
18.5 - 22.9 - Overweight:
23.0 - 27.4 - Obese:
>= 27.5
- Underweight:
- Goal Tuning:
- Loss:
TDEE - 350 kcal - Maintain:
TDEE - Gain:
TDEE + 300 kcal
- Loss:
- Target Macro Split (Energy): 55% Carbohydrates | 15% Protein | 30% Fats
- Daily Essentials: Fiber target of
25g/day, Water intake target of33 ml/kg IBW(Ideal Body Weight)
- Structured Meal Assembly: Combines local staples (Rice, Dal, Vegetables, Salad, and Fish/Meat) to suggest culturally meaningful meals rather than arbitrary ingredient lists.
- Compatibility Parameters: Evaluated across six vectors: Nutrient Complementarity, Traditional Co-occurrence, Digestibility & GI Impact, Condition Safety, Taste & Cultural Preference, and Affordability & Availability.
The system processes all user interactions via a 6-stage sequential workflow:
- Ask / Log: Ingress of user queries via text, voice recordings (Whisper), or food images.
- Smart Routing: The state router performs cache hits and security screening before downstream evaluation.
- Data Retrieval: Fetches real-time relational SQL data, Pinecone recipe vectors, and Neo4j graph nodes.
- AI Reasoning: LangGraph coordinates Pusti AI and NutriSaathi execution paths.
- Response: Emits real-time language-matched feedback (Bangla/English).
- Learn & Improve: Stores response characteristics for regression validation testing.
The system relies on a dual-schema storage design to partition user transactional logs from clinical rules:
Details user profiles, daily calorie targets, weight charts, and meal tracking logs.

Models direct relationships between diseases, micro/macro nutrients, and local food items, serving as the source of truth for safe food verification.

Strict token budget management is enforced across the application to ensure low latency and reduced LLM API costs:
- Redis-Backed Semantic Caching: Caches embeddings and responses for general queries to resolve similar questions instantly under 50ms with zero API cost.
- Local Exact Match Check: Pre-hashes query strings using MD5 to check for exact cache hits, bypassing embedding and LLM API calls completely.
- Sliding History Window & Summarization: Limits active conversational history to the last 6 turns and routes older messages to a lightweight model (
gpt-4o-mini) to build a single concise context summary. - Local Context Pruning: Uses a lightweight Jaccard token overlap algorithm to trim long RAG food contexts and profile details locally to fit within strict prompt token budgets.
The system employs a dual-RAG approach to handle both structured clinical data and unstructured cooking manuals:
- Vector RAG (Pinecone / NutriSaathi Cooking Assistant):
- Data Source: Unstructured dietary/cooking manuals (
ragdata.md). - Chunking: Cosine similarity-based Semantic Chunking (0.65 threshold, max 1000 chars) prepended with Anthropic-style Contextual RAG summaries.
- Embeddings: Local embedding generation using
all-MiniLM-L6-v2.
- Data Source: Unstructured dietary/cooking manuals (
- Graph RAG (Neo4j / Pusti AI Clinical Diet Logic):
- Data Source: Structured food composition tables and clinical nutrition databases.
- Chunking: None (data is mapped directly into discrete entity nodes and relations in the Knowledge Graph).
- Embeddings: Entity-based property matching and graph traversal. Evaluates RDA and micronutrient similarity scores natively using graph algorithms.
The system uses LangGraph (StateGraph) to orchestrate two specialized sub-agents:
- Pusti AI: Clinical agent implementing clinical diet guidelines.
- NutriSaathi: Cooking agent offering step-by-step culinary guidance.
The architecture features a conditional router, memory condensation (Redis summaries), and full tool-calling support enabling the agents to:
- Manage meal tracking and fetch daily/weekly meal plans.
- Update user profiles and log health metrics (weight, blood sugar, BP).
- Compile comprehensive nutrition reports and set medicine reminders.
- Check food safety and trigger in-app page navigation.
To guarantee reliable outputs and restrict model behavior, we enforce:
- Role-Play & Persona Definitions: Distinct clinical roles guide response tone and boundaries ("Pusti AI" as a warm health intake specialist, "NutriSaathi" as a culturally grounded cooking guide).
- Unicode Banners & Section Blocks: Prompt templates are structured with explicit unicode banners (e.g.,
CORE RULES,CONTEXT BLOCK) to logically separate instructions, retrieved medical RAG contexts, and user profile data. - Strict Code-switching Rules: Prompts enforce language-matching logic (returning Bengali script responses for Bengali input, and English/Banglish instructions otherwise).
- Structured Markers & JSON Outputs: Instructions direct the models to return strictly formatted JSON matching Pydantic targets or terminate intake collection with special string markers (e.g.,
##DIET_DATA_COMPLETE##) followed by a serialized dictionary.
The repository structure and building mechanisms were created and accelerated using:
- Graphify: Automatically maps codebase relations to analyze architectural dependencies.
- Kiro / AWS Kiro: Steering configuration management to automate workspace rules and code alignment.
We employ enterprise tools to oversee prompt performance and application health:
- LangSmith: Used for LLM API monitoring, trace observability, and prompt execution tracking — covering Trace Count, Trace Latency (P50/P99), and real-time Error Rate.
- Custom Business & System Monitoring Dashboards: Provides real-time metrics on user engagement, meal plans generated, and cache hit rates.
LangSmith API Monitoring![]() |
- Pre-routing Safety Guardrail: A dedicated LangGraph
SafetyGuardNodeevaluates all incoming messages using structured JSON outputs to detect and refuse prompt injection, jailbreaks, clinical diagnoses, and drug prescription queries before downstream routing. - Database Context Isolation: Out-of-scope queries trigger immediate exit states, completely bypassing Vector (Pinecone) and Graph (Neo4j) database connections to prevent unauthorized data access/leaks.
- Cache PII Protection: The
TokenOptimizer.is_cacheablelogic parses query words to prevent user-specific metrics or personal details from entering the shared Redis semantic cache.
- LangGraph: Multi-agent state management and execution graph orchestration.
- Fastembed (Qdrant): Local
all-MiniLM-L6-v2vector embeddings. - Neo4j: Clinical Knowledge Graph queries.
- Pinecone: Recipe vector storage.
- Redis: Semantic caching and conversational summaries.
- Prisma Client: Database ORM for relational queries.
- FastAPI: Server endpoints and Server-Sent Events (SSE) chat streaming.
A custom validation suite executes regression checks:
- Recommendation Stability: Verifies personalization variance among various demographic groups (Age/Gender/RDA keys).
- Nutrient Coverage: Confirms top recommendations meet clinical RDA targets.
- Regression Testing: Measures token optimization metrics including semantic cache hit rates, Jaccard-based context pruning overlaps, and latency distribution.
- Manual Safety Audits: Ensures clinical constraints are strictly grounded in BIRDEM/WHO guidelines.
- Python 3.11+
- Node.js 18+
- PostgreSQL & Redis
- Neo4j instance (Local or AuraDB)
- OpenAI API Key
cd backend
python -m venv venv
source venv/bin/activate
# Install and init ORM
pip install -r requirements.txt
cp .env.example .env
python -m prisma generate
python -m prisma db push
# Start Server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000cd frontend
npm install
echo "VITE_API_URL=http://localhost:8000" > .env
npm run devcd whatsapp-service
npm install
npm run dev


































