Yesterday we built an autonomous support agent that resolves customer issues with tools. Today we turn to the company's own numbers with an AI Business Intelligence System: one that connects your data sources, keeps metrics consistent, spots trends and anomalies, and delivers insights as dashboards, scheduled reports, and alerts. The focus here is governed, recurring business reporting. Ad-hoc question answering over SQL gets its own build tomorrow.
Save this sheet. The rest of this note walks through it section by section.
What We Are Building
An AI Business Intelligence System that:
- Connects to multiple data sources and cleans the data
- Analyzes trends and patterns
- Generates insights automatically and creates visual dashboards
- Answers business questions in natural language
- Sends automated reports and alerts
- Helps teams make data-driven decisions
Use cases: executive dashboards, sales performance, marketing campaign insights, financial reporting, customer analytics, supply chain, operational metrics, and anomaly alerts.
System Architecture
Data Sources -> ETL and Data Processing -> Data Warehouse and Storage
-> AI Analysis Engine (LLM) -> Insights and Visualization -> Decision and Action
Notice that the LLM shows up in stage four, after three stages of plain data engineering. That ordering is honest. Most of the work in an AI BI system is getting trustworthy data into one place. An LLM on top of messy, inconsistent data produces confident, well-written, wrong insights.
Key Components
| Component | Job |
|---|---|
| Data connectors | Pull from databases, APIs, files, SaaS apps |
| Data pipeline | Extract, clean, transform, load on a schedule |
| Data warehouse | Structured store for analytics (Snowflake, BigQuery, Redshift, or Postgres at small scale) |
| Semantic layer | Defines metrics, dimensions, and joins once |
| AI / LLM engine | Explains trends, writes summaries, answers questions |
| Visualization engine | Dashboards, charts, KPIs |
| Alerting system | Pushes anomalies and reports to Slack, email, Teams |
| Access and permissions | Who can see which metrics and rows |
The Semantic Layer Is the Foundation
The sheet lists a semantic layer as a key component, and it deserves the most attention. A semantic layer is where you define each metric once, with its formula, source table, time column, and allowed dimensions:
metrics:
- name: net_revenue
description: Revenue after refunds and discounts, in USD
table: analytics.orders
expression: SUM(order_total - refund_amount - discount_amount)
time_column: ordered_at
dimensions: [region, channel, product_category]
owner: finance
The LLM then asks for net_revenue by region, last 30 days instead of writing free-form SQL against raw tables. This has three effects:
- Consistency. The number in the AI summary matches the number on the finance dashboard.
- Safety. The model can only reach metrics you have defined and permissioned.
- Better answers. Metric descriptions give the model the business context it needs.
The sheet places a vector database in the semantic layer row of its stack. That is useful for one thing: helping the model find the right metric for a vaguely worded question by searching metric names and descriptions. The definitions themselves should live in version-controlled config, not in a vector index.
Data to Insights Flow
The detailed flow on the sheet:
- Connect data sources and ingest data.
- Validate and clean, then transform and aggregate.
- Store in the warehouse.
- Business questions (natural language) and ad-hoc exploration both feed the AI analysis engine.
- The engine produces insights and key findings, dashboards, automated reports, and alerts.
- These drive decisions and actions: recommendations, plans, optimizations.
Here is the division of labor that keeps this honest. Detection is statistics. Explanation is the LLM. A scheduled job computes period-over-period changes, decomposes them by dimension, and flags values outside expected ranges. The LLM receives those computed results and writes the paragraph a human will read. It should not be asked to eyeball a table of numbers and find the anomaly itself.
A Minimal Tech Stack
| Layer | Minimal choice |
|---|---|
| Frontend | Next.js, or start with an existing BI tool like Apache Superset |
| Backend | Python (FastAPI) |
| Processing | Pandas or Polars, Spark only at real scale |
| Warehouse | PostgreSQL to start, Snowflake or BigQuery as you grow |
| Orchestration | Airflow, Prefect, or Dagster for scheduled pipelines |
| LLM | One general model for summaries and Q&A |
| Delivery | Slack, email, or Teams |
Example Dashboard and Insights
The sheet's sample dashboard shows total revenue, new customers, active users, and conversion rate, each with a change versus last month, plus revenue over time, sales by region, and top products. Below that sit two AI panels.
Recent insights read like: revenue increased mainly due to growth in North America; one product contributes about a third of total revenue; conversion rate improved for the third consecutive month.
Anomaly alerts read like: sudden drop in signups in the Asia region; high refund rate detected in one product.
To make "mainly due to growth in North America" trustworthy, the system must compute the contribution of each region to the change, then pass that table to the LLM with an instruction to describe only what the data shows. Each insight should link to the query and numbers behind it, so a skeptical executive can check it in one click.
Delivery matters as much as analysis. At CodeITronics, our Consolidated KPI Reporting Bot replaced founders logging into five tools daily with a cron worker that polls Stripe, PostHog, and SQL and posts a daily Slack summary. The result was zero daily dashboard logins. Often the most useful BI interface is a short message in the channel people already read.
Production Concerns
Data quality. Add tests to your pipelines for freshness, row counts, nulls, and duplicates. If yesterday's data did not load, the AI summary must say so instead of reporting a fake drop.
Evaluation. For generated insights, check factual accuracy against the source numbers automatically: every number in the text should appear in the input data. Track how often humans flag an insight as wrong or useless.
Alert fatigue. Too many anomaly alerts and people mute the channel. Start with a few high-value metrics, tune thresholds, and group related alerts into one message.
Permissions. Apply row and metric-level access before data reaches the LLM. A regional manager's summary should not include other regions.
Cost. Warehouse compute usually dominates, not LLM tokens. Summaries run on small aggregated tables, so they are cheap. Schedule heavy transforms off-peak.
Key Takeaways
- An AI BI system is mostly data engineering. The LLM sits on top of a trusted pipeline.
- Define metrics once in a semantic layer and let the LLM query metrics, not raw tables.
- Detect anomalies with statistics, then use the LLM to explain them.
- Deliver insights where people already work, and link every insight to its numbers.
FAQs
How is this different from the Day 8 data analyst?
Day 8 was an exploration copilot for analyzing a dataset you load. This system runs continuously over governed company metrics and produces recurring reports and alerts.
Do I need a data warehouse to start?
Not necessarily. A Postgres read replica with a few well-defined views works for early-stage companies. Move to a warehouse when data volume or source count makes it painful.
Can the LLM do forecasting for BI?
Use proper forecasting models for forecasts. The LLM can explain the forecast, its assumptions, and its uncertainty in plain language.
Up Next
Day 15 builds the AI Text-to-SQL Data Analyst: natural language questions turned into safe SQL over your warehouse, with schema grounding, query validation, read-only guards, and a review step before anything runs. If you want AI reporting built on your own data, get in touch.




Letters to the editor
No letters yet. Questions and counterpoints are welcome.