The Challenge
Even with a dashboard (Project 1), store managers couldn't get answers to ad-hoc questions without developer help. 'Which Zara products had the highest markdown loss in Fall?' requires writing a pandas query — something non-technical managers can't do. Additionally, no automated system existed to proactively surface anomalies or compile weekly KPIs, meaning issues like rising return rates went unnoticed for weeks.
The Solution
I built a conversational AI assistant powered by Llama 3.3 70B (Groq). The NL query engine converts plain-English questions into pandas code via structured JSON output, then executes the code inside a RestrictedPython sandbox — only pandas and numpy are accessible; file system, network, and eval are fully blocked. A 10-rule anomaly detection engine runs automatically and surfaces HIGH/MEDIUM/LOW severity alerts live in the chat sidebar. A KPI generator computes ~20 metrics and produces formatted weekly Markdown reports for store managers.
Results
<3s
Plain-English question → Plotly chart
10
Automated anomaly rules (returns, ratings, inventory, revenue)
9
HIGH-severity anomalies detected automatically on first run
100%
LLM-generated code sandboxed — zero filesystem/network access
Tech Stack
“I can just ask it 'which brands had returns above 15% last month' and it shows me a chart instantly. I don't need to wait for a developer anymore — the data answers me directly.”
Operations Lead
Luxe & Thread Boutique