How vijayalakshmiburidi-cloud/nutri_mcdonald works
This is a McDonald’s India nutrition assistant: users ask about menu items, nutrition, and recommendations through a Gradio chat interface; the agent applies scope checks, resolves follow-ups using isolated session history, routes questions to SQL and/or semantic retrieval, and returns an answer. The data workflow cleans the menu dataset and loads it into relational and vector stores. The graph also shows the documented Ngrok access and session logging. Relationships follow the excerpts and README; unshown implementation details are omitted.
Main entry points: orchestrator.py Agent Orchestrator · load_databases.py Database Loader · settings.py Clients and Settings · main_UI.py Gradio Chat
Components 18
User Interface
- Gradio Chat
main_UI.py - HTTPS Tunnel
main_UI.py
Agent Workflow
- Agent Orchestrator
core/orchestrator.py - Scope Guardrail
core/orchestrator.py - Follow-up Memory
core/memory.py - Keyword Router
core/router.py
Menu Knowledge
- SQL Tool
tools/sql_engine.py - RAG Tool
tools/rag_engine.py - Raw Menu Dataset
data_pipeline/India_Menu.csv - Dataset Cleaner
data_pipeline/clean_dataset.py - Clean Menu Dataset
data_pipeline/India_Menu_Clean.csv - Database Loader
data_pipeline/load_databases.py - MySQL Menu Table
- Chroma Collection
Shared Services
- Clients and Settings
config/settings.py - Groq API
- Session Logs
core/orchestrator.py
Other components
- Chat User
Connections 22
- Chat User → Gradio Chat: asks
main_UI.py - Gradio Chat → Agent Orchestrator: calls
main_UI.py - Gradio Chat → HTTPS Tunnel: exposes through
main_UI.py - Agent Orchestrator → Scope Guardrail: checks scope
core/orchestrator.py - Agent Orchestrator → Keyword Router: routes with
core/orchestrator.py - Agent Orchestrator → Follow-up Memory: resolves follow-ups
core/orchestrator.py - Agent Orchestrator → SQL Tool: calls
core/orchestrator.py - Agent Orchestrator → RAG Tool: calls
core/orchestrator.py - Agent Orchestrator → Session Logs: writes turns
core/orchestrator.py - SQL Tool → MySQL Menu Table: queries
tools/sql_engine.py - RAG Tool → Chroma Collection: retrieves context
tools/rag_engine.py - Raw Menu Dataset → Dataset Cleaner: input to
data_pipeline/clean_dataset.py - Dataset Cleaner → Clean Menu Dataset: writes
data_pipeline/clean_dataset.py - Database Loader → Clean Menu Dataset: reads
data_pipeline/load_databases.py - Database Loader → MySQL Menu Table: loads table
data_pipeline/load_databases.py - Database Loader → Chroma Collection: builds index
data_pipeline/load_databases.py - Clients and Settings → MySQL Menu Table: configures client
config/settings.py - Clients and Settings → Chroma Collection: opens collection
config/settings.py - Clients and Settings → Groq API: creates client
config/settings.py - SQL Tool → Groq API: generates SQL with
tools/sql_engine.py - RAG Tool → Groq API: generates answer with
tools/rag_engine.py - Follow-up Memory → Groq API: resolves with
core/memory.py