Natural-language intelligence over private marketing data.
A multi-tenant analytics platform for enterprise B2B marketing teams, turning campaign and account data into governed NL-to-SQL analysis, attribution, forecasting, anomaly detection, reporting, and operator approval workflows.
Local inference, strict tenant boundaries, and practical analyst workflows.
The product had to let operators ask natural-language questions over sensitive client data without creating cross-tenant leakage, runaway LLM spend, or unreviewed automated actions.
Account dataABM, intent, budget, pipeline, and benchmark datasets.
Governed access
Tenant isolationLLM prompt constraints, SQL validation, and server-side WHERE injection.
API layer31 Python modules and 80+ REST endpoints across platform services.
AI reasoning
Local Qwen/Ollama7B model for SQL and narration; 1.5B model for classification.
Intent routingDATA, CHAT, WHY, OFFTOPIC, and ESCALATION paths.
Operator outputs
AnalyticsNL-to-SQL, attribution, forecasting, anomaly detection, and benchmarks.
ApprovalsConfidence-scored action queues, monthly reports, QBRs, and digests.
What I owned
Defined the product architecture, local model strategy, API boundaries, and tenant isolation model.
Built the NL-to-SQL chat layer with a 5-route intent classifier (DATA / CHAT / WHY / OFFTOPIC / ESCALATION), SQL validation, narration, and refusal paths.
Designed the analytics action layer: Markov-chain attribution via removal-effect analysis, a budget optimizer with marginal-efficiency and diminishing-returns estimation, what-if scenario simulator, forecasts, anomaly detection, anonymous cross-account percentile benchmarking, and confidence-scored approval queues for agentic auto-actions.
Implemented reporting automation: monthly HTML reports, QBR support, weekly digests, and video/voice briefing outputs.
Why it is better than a demo
The system had to handle private operational data, not toy datasets. The architecture reduced per-query LLM cost by keeping high-frequency analyst queries local, constrained all data access by tenant, and kept business actions behind approval queues instead of letting agents mutate live campaign state unchecked.