Skip to main content

MULTI-AGENT BI

AI BI Agent

A multi-agent BI system that turns natural language into verified analytical insights.

One question, four agentsSimulated example
Stakeholder asks

What was Q3 2024 revenue for product SKU-4421?

  1. RouterExact lookup with a date, so it takes the fast path
  2. RetrieverBM25 finds SKU-4421; vectors add the Q3 context
  3. AnalystWrites the answer and cites each data point
  4. ValidatorChecks every number against the source data
Checked answer

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

Today
  • Dashboards that only their creators understand
  • SQL queries that take days to write
  • Insights that arrive too late to act on
With the AI BI Agent

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

Business question, in plain English1 · Routerintent and complexity2 · RetrieverQdrant vectors + BM25 keywords3 · AnalystGPT-4o insights with citations4 · Validatorchecks claims, scores confidenceVerified, sourced answer
The AI BI Agent: four agents, one verified answer

The AI BI Agent is a multi-agent system on LangGraph with 4 coordinated AI agents, each with a distinct role:

Agent 1 — The Router

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.

Agent 2 — The Retriever

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.

Agent 3 — The Analyst

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.

Agent 4 — The Validator

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

Why LangGraph over CrewAI or AutoGen?
LangGraphoverCrewAIAutoGen

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.

Why Qdrant + BM25 hybrid, not just vector search?
Qdrant + BM25overvectors only

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.

Why Streamlit for the frontend?
Streamlitovera custom frontend

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

TraceLangSmith
  1. Router
  2. Retriever
  3. Analyst
  4. Validator
How one traced request reads (illustration)

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
Watch an agentBook a 20-minute call