MULTI-AGENT BI
AI BI Agent
A multi-agent BI system that turns natural language into verified analytical insights.
What was Q3 2024 revenue for product SKU-4421?
- RouterExact lookup with a date, so it takes the fast path
- RetrieverBM25 finds SKU-4421; vectors add the Q3 context
- AnalystWrites the answer and cites each data point
- ValidatorChecks every number against the source data
Q3 2024 revenue for SKU-4421, with its sources and a confidence score.
The AI BI Agent turns a business question into a checked answer with sources. Four agents work together on each question, so a stakeholder gets a sourced answer without writing SQL or waiting for an analyst.
- Scope
- 4 coordinated agents
- Role
- Solo Architect & Builder
- Status
- LangGraph pipeline
- Stack
- LangGraph
- GPT-4o
- Qdrant
- BM25
- Streamlit
- LangSmith
The Problem
- Dashboards that only their creators understand
- SQL queries that take days to write
- Insights that arrive too late to act on
Ask in plain English, get a verified, sourced answer
Business intelligence is broken for most organizations. Analysts spend much of their time finding data rather than analyzing it. Self-serve BI tools promised democratization but delivered complexity — dashboards that only their creators understand, SQL queries that take days to write, and insights that arrive too late to act on.
The goal is a system where any stakeholder can ask a business question in plain English and get a verified, sourced analytical answer — not a hallucinated guess from a chatbot.
The Architecture
The AI BI Agent is a multi-agent system on LangGraph with 4 coordinated AI agents, each with a distinct role:
Classifies incoming queries by intent, complexity, and required data sources. It routes simple lookups to a fast path and complex analytical questions to the full pipeline, so routine questions are answered faster.
Runs hybrid search across structured and unstructured enterprise data using Qdrant (vector) + BM25 (keyword). The dual approach gives high recall for exact-match queries (product IDs, dates) and keeps semantic understanding for fuzzy natural language questions.
Takes retrieved context and generates analytical insights using GPT-4o. The agent applies analytical frameworks instead of raw summarization: trend detection, anomaly flagging, comparative analysis. Every claim is grounded in specific data points with citations.
Reviews the Analyst's output against source data: checks numerical accuracy, flags unsupported claims, and adds confidence scores. This agent makes the AI BI Agent's outputs trustworthy because it catches made-up answers before users see them.
Technical Decisions
Explicit state management. LangGraph gives me a directed graph with typed state, conditional edges, and checkpoint persistence. When Agent 3 fails, I need deterministic retry logic — not an autonomous agent deciding what to do next. Production systems need predictable failure modes.
Vector search alone misses exact matches. When a user asks "Q3 2024 revenue for product SKU-4421," pure semantic search might return similar products. BM25 catches the exact SKU. The hybrid retriever uses reciprocal rank fusion to combine both result sets.
Speed to a working interface. Streamlit gives a functional, polished UI in weeks, not months, while I focus engineering time on the agent pipeline — which is where the actual complexity lives.
Observability
- Router
- Retriever
- Analyst
- Validator
Every agent interaction is traced end-to-end through LangSmith, showing:
- Token usage per agent per query
- Retrieval relevance scores
- Validator rejection rates and reasons
- Latency breakdown by pipeline stage
This is structured observability that feeds back into system optimization, beyond plain logging. When retrieval quality drops for a specific data domain, it shows within hours, not weeks.
What the AI BI Agent Measures
The AI BI Agent tracks four quality measures on every deployment. This page reports a number only when it comes from a real run or a real client:
- Share of retrieved passages that are relevant to the question
- Share of unsupported claims the Validator catches
- Median time from question to checked answer
- How often the Router's fast path answers correctly