2025Agentic Analytics · FabricDemo available

SME&C Agentic Analytics Platform

A custom agentic analytics system that turns natural-language business questions into grounded KPI retrieval, query enrichment, SQL generation, Fabric execution, validation, charts, and business insights.

FastAPIAzure OpenAIMicrosoft FabricRedisSQL
headline impact
Demo
grounded analytics over Microsoft Fabric · KPI, SQL, charts, insights in one response
my role
Role
Lead developer · custom backend, orchestration, agents, FastAPI APIs, SQL generation, validation, Redis history, Fabric SQL integration, and response formatting
status
Status
Demo available · enterprise agentic analytics solution
demo
Demo available
Demo walkthrough available
the problem

What was broken

SME&C stakeholders depended on dashboards and ad hoc reports built by BI teams. Every new business question turned into a new report request or manual analysis across multiple sources, growing a sprawling report repository and pushing real insight generation behind data modelling and integration work. Users wanted natural-language access to KPI, program, and offer information without writing SQL or waiting on a BI cycle.

my approach

How I built it

I built a custom agentic analytics service that lets users ask natural-language questions over Programs and Offers. A FastAPI endpoint accepts the query, sample row count, and username, starts a Redis-backed history check, warms connections asynchronously, and runs an orchestrator pipeline: intent classification, query exploder, KPI planning, KPI / program metadata retrieval through Azure AI Search, query enrichment, table extraction, SQL code generation, execution against the Fabric SQL Endpoint, a validation / refinement loop, then chart generation and business insight narration. The response is a structured multi-tab payload containing output, insights, follow-ups, HTML table, base64 graph, SQL, metrics used, filters, and confidence — designed for multi-KPI answers with parallel processing.

why this way

The reasoning

One giant text-to-SQL prompt collapses on a real enterprise KPI catalog. Splitting reasoning into intent → KPI planning → enrichment → SQL → validation → insight gives each step a focused contract, evals, and retry boundary. Grounding through Azure AI Search over KPI and program metadata keeps SQL honest; the Fabric SQL Endpoint keeps execution on governed data; Redis keeps user history and warm connections fast; parallel execution keeps multi-KPI answers responsive.

architecture

How the pieces fit

Client / API
FastAPI analytics endpointsRequest: user_query, sample_rows, username
Session & Warmup
Redis history & metadataAsync connection warmup
Orchestration
Intent ClassifierQuery ExploderQuery Enrichment
Knowledge Retrieval (Azure AI Search)
KPI PlannerKPI MetadataProgram MetadataTable & Column Retrieval
Code & Execution
SQL Code GenerationFabric SQL Endpoint ExecutionValidation & Refinement Loop
Response Synthesis
Chart Recommendation & GenerationBusiness Insight AgentStructured Multi-Tab Response
what I built

Key components

  • 01FastAPI analytics API with Pydantic request and response models
  • 02Redis-backed user history, conversation metadata, and connection warmup
  • 03Azure OpenAI agents across intent, KPI planning, enrichment, SQL, validation, and insight
  • 04Azure AI Search retrieval over KPI, program, and table & column metadata
  • 05Microsoft Fabric SQL Endpoint for governed query execution
  • 06SQL validation and retry / refinement loop for resilient generation
  • 07Parallel execution for KPI / program retrieval and insight / chart generation
  • 08HTML table + base64 graph + structured tabs for output, insights, follow-up, SQL, metrics, filters, confidence, and status
  • 09Configuration-driven model deployment, token settings, index names, retrieval parameters, and SQL execution limits
  • 10Observability via logging and per-stage timing breakdowns through Azure Monitor
what I used

Tech stack

Backend
FastAPIPythonAsyncIOPydanticREST APIs
Agentic AI
Azure OpenAILangGraphMulti-Agent OrchestrationPrompt EngineeringRAG
Data
Microsoft FabricFabric SQL EndpointPySparkSQLDelta Lake
State & Ops
Azure RedisAzure AI SearchAzure Monitor
video demo

Supabase-hosted walkthrough

SME&C agentic solution demo

see it run

In-browser demo

A scripted walkthrough of the demo flow, traced step by step.

smec_platform · /analyze
press play to watch the trace