← Back to portfolio
project 2025-01

AI-Powered Analytics Assistant

Built an AI-powered analytics assistant that lets business users pull real-time data independently, reducing repeated data-fetch requests to the data engineering team.

AIBigQueryPython
10–100 daily queries
5–10 business users

AI-Powered Analytics Assistant

A conversational analytics tool that converts natural language into BigQuery SQL, enabling business users to self-serve repeated data pulls in real time, without raising tickets.

The Problem

The data engineering team was fielding repetitive data requests from business users and analysts - “what’s the count for X today?”, “give me last week’s numbers for Y”. These were not complex queries. They were L0 requests: simple lookups, recurring metrics, time-bound snapshots. But they were arriving constantly and consuming engineering bandwidth.

Two distinct groups needed help:

The volume was variable: 10–100 queries per day depending on the time of month, with spikes at reporting cycles and month-end closes.

What Was Built

An AI chatbot that converts natural language questions into BigQuery SQL, executes them, and returns results - all without engineering involvement. Powered by Google Agent Development Kit (ADK), Vertex AI (Gemini), and a RAG layer over warehouse metadata.

A business user types: “What’s today’s count for orders pending dispatch?” - and gets a result, not a ticket acknowledgment.

Architecture

flowchart TD
    A["Business User / Analyst\n(natural language question)"] --> B["Google ADK Agent\n(orchestrator)"]
    B --> C["Vertex AI - Gemini\n(LLM)"]
    B --> D["RAG Layer\n(schema metadata, column docs, query examples)"]
    C --> E["SQL Generation + Validation"]
    D --> E
    E --> F[("BigQuery")]
    F --> G["Results returned in real time"]

Tech Stack

LayerTechnology
Agent FrameworkGoogle Agent Development Kit (ADK)
LLMVertex AI (Gemini)
Knowledge BaseRAG over BigQuery schema metadata, column descriptions, curated examples
Query EngineBigQuery
LanguagePython

Key Metrics

MetricValue
Daily query volume10–100 (varies by time of month)
Analysts using for L0 work2–10
Business users self-serving real-time data5–10
Reduction in repeated data-fetch requestsSignificant - recurring asks moved fully to self-serve

Design Decisions

RAG for SQL accuracy

Handling repeated, real-time requests

SQL validation before execution

Variable load by time of month

What I Learned


Built at Wayfair India · 2025