AI-Powered Analytics Dashboard
Primary Infotech created a real-time analytics dashboard with natural-language querying. Users can ask business questions in plain English and receive data-driven visual answers across connected data sources.
- Query Speed
- < 2s
- User Adoption
- 95%
- Data Sources
- 12+
01
The Challenge
The data team had become a bottleneck for every business decision. Non-technical stakeholders couldn't query data themselves, and the backlog of ad-hoc report requests had grown past 40.
Leaders were making decisions on week-old spreadsheets while analysts spent their days writing one-off SQL.
02
Our Solution
We built a Next.js dashboard with an AI-powered natural-language query interface. Anyone can ask a question in plain English — "Show me revenue by region for Q3" — and get an instant, interactive visualisation.
Behind the scenes, LangChain translates each question into validated, read-only SQL against a PostgreSQL warehouse that unifies more than twelve data sources.
03
Technology
Next.js front end with streaming responses, a LangChain text-to-SQL agent with schema-aware prompting and query validation, and a PostgreSQL warehouse fed by scheduled ELT jobs.
- Next.js
- LangChain
- PostgreSQL
- TypeScript
- OpenAI
- Airflow
04
AI Architecture
-
1
Natural-language question
User asks in plain English from the dashboard
-
2
Schema-aware agent
LangChain maps intent to tables, metrics and filters
-
3
SQL validation
Queries are checked, read-only and cost-limited
-
4
Warehouse
PostgreSQL unifies 12+ data sources via scheduled ELT
-
5
Visual answer
Results stream back as the most suitable chart
05
The Results
95% of intended users adopted the dashboard within the first month. The ad-hoc report backlog was eliminated entirely, and decisions that used to wait days now happen in the meeting where the question is asked.