Subtile Icon
Integration details

Seamless Integrations, Endless Possibilities.

Conversational Analytics for Retail: An AI Data Analyst Agent That Answers in 30 Seconds

Conversational Analytics for Retail: An AI Data Analyst Agent That Answers in 30 Seconds

Industry: Retail and e-commerce (beauty)

Project type: Conversational analytics software: an AI data analyst agent (text-to-SQL) on a cloud data warehouse, with AI-built dashboards

A large beauty retail chain had a familiar bottleneck. Every ad-hoc question from a regional director, a store manager or an executive went to the data team, and an analyst wrote the SQL by hand. The retailer replaced that queue with conversational analytics: an AI data analyst agent that lives in the team's chat tool. It writes the query, runs it on the warehouse and replies with the numbers in about 30 seconds.

Context: Where the Data Lives and Who Asks

All company data sits in a cloud data warehouse on Google Cloud, queried through BigQuery. Dashboards run on Power BI and Looker Studio, and the data team is large and builds many of them.

Sales exist in two forms:

  • Invoiced sales are final. Customers can return an order within about two weeks, and fraud gets removed, so invoiced sales are net of returns and fraud.
  • Orders are the real-time view of what customers just bought.

Website behavior is stored as events: a page view, an add to cart, a session start. Each event has its own name and parameters. The analytics layer does not store client IDs. It stores a hashed identifier, and an analyst has to join it to another table to get the client ID before sales can be matched.

The questions come from people far from the data. A regional director wants to know which brands drive growth in the stores of one region and how that compares with last year, two years ago and three years ago. Another wants to know whether a newly launched brand cannibalized sales of other brands, some of them higher-margin.

The Problem: Ad-Hoc Analytics Requests Burn Analyst Time

Dashboards cover the common questions. Narrow questions, such as one brand in one city, one new launch or one customer cohort, have no dashboard. They arrive by email or in the chat tool, and each one becomes a manual SQL task.

One case shows the pressure. An executive visited a store, and the staff were asked how a luxury brand was performing. That brand had paid for promotion in that store. Nobody could answer on the spot. They would have to go back to a computer, log in to the system and pull the exact numbers. Estimates were not enough.

The effort varies a lot:

  • A simple query takes about two minutes for an analyst who is free.
  • A complex query takes one to two hours with verification. Example: count visits to one brand's page in the last 30 days, then check whether those same customers bought that brand within seven days of the visit. The analyst filters the right event name, removes junk events, agrees with the requester on unique users versus sessions, joins the hashed identifier to get client IDs, joins sales and counts purchases inside the window.
  • Cross-checking adds more time. For important numbers the analyst compared the result with a second source, SAP, where sales are also stored.

Before AI, one analyst could lose about one full day a week to small requests like these. Across a team of ten analysts, that adds up to the equivalent of about three full-time analysts every month, work worth about $15,000 a month, spent on queries that rarely move revenue.

Dashboard work has the same problem. At another large company, a product team went two quarters without its quarterly goals dashboard because analysts could not find the time to build it.

Ad-hoc analytics requests from managers piling up in a queue for a single data analyst

The Solution: An AI SQL Agent Inside the Team Chat

A Text-to-SQL Agent on Gemini and BigQuery

A user types a question in plain language in the team's chat tool, for example the sales share of a luxury brand in one city or store. The agent runs on Google's Gemini model and connects to BigQuery through a connector. It writes the SQL itself and runs it on the warehouse. In about 30 seconds it replies with the numbers as text. If a dashboard exists for the topic, the agent also links to it for more detail.

The same agent answers questions that dashboards deliberately leave out. The main dashboard does not show brand launch dates, because extra fields make a dashboard hard to read. The agent can still answer how brands launched this year are performing. The retailer launches about 20 new brands a year.

Conversational analytics agent answering a question in team chat by running SQL on the data warehouse

Teaching the Agent With Reference Queries

The agent was trained on the retailer's own logic. The lead analyst wrote ideal queries by hand, the way he would solve each type of request, and used them as examples. They teach rules such as: a question about a brand means using the brand column, and a share question means taking that brand's sales and dividing by the totals of the selected stores.

The agent also learned what the data means. A small tagging team maintains a spreadsheet that describes every website event and parameter, and that description is fed to the model. Much of it follows the standard Google Analytics e-commerce event names, so it is largely standardized across retailers.

Admin Panel and Verification

The team reviews answers by hand. Through an admin panel, they record corrections, such as "you made a mistake, this should be calculated this way". The wording of the reply went through several rounds of edits so that the numbers read clearly.

Cross-checks against SAP used to be routine for important queries. Today they are rare, because the agent's numbers matched almost every time.

Text-to-SQL agent trained on reference queries, an event dictionary and analyst corrections

Why It Took 18 Months, and Why It Could Take a Week Now

The first version took about a year and a half. Prompt engineering was only part of it. The larger blockers were corporate firewalls and approvals. Pushing notifications from the agent into the chat tool meant getting through several layers of security review in a large organization.

That work was done before managed agent frameworks such as Google's Agent Development Kit existed. With all data already in Google Cloud, the team can now build a comparable agent on that framework in about a week. A migration to it is being tested.

AI-Built Dashboards: The Next Step

Dashboards followed the same manual path. One example: management asked for a one-page real-time dashboard for the exclusive launch of a high-profile celebrity beauty brand. It had to refresh every ten minutes and show total sales, remaining stock, conversion rate, retail versus web sales, and a table of sales by store. Building it meant creating each tile by hand, writing conditions so a number reads "1.1M" instead of six digits and "2.2K" for thousands, and fixing field names in every visual.

The company has now approved an internal Claude Code setup in the code editor. The data team plans to send the request to Claude, let it build the one-page view, and share it with management as a visual component or a screenshot. A colleague tested a similar flow and got a finished dashboard in about an hour, with the colors and metrics set up. Data security and access rules are a separate question, but the team thinks some visualization work may move away from BI tools. The effect is a much faster path from a request to something management can read.

One-page real-time launch dashboard with sales, stock and conversion tiles built with AI

Results

  • About 30 seconds from question to answer, instead of a request to the data team.
  • About $15,000 a month of analyst time replaced by about $200 a month in model usage. The freed time equals about three full-time analysts across a team of ten, from small requests that used to eat roughly a day a week each. Model usage peaks just above $300 a month, and that figure also covers a second bot.
  • Payback in about three months on the roughly $45,000 build, at that rate of savings.
  • Analysts now work on analysis that affects the P&L, such as which brands and categories to sell and which niche brands to launch in a market. Historical lookups for a manager do not add profit.
  • No junior hires. Management no longer needs to add a junior analyst or intern to absorb the small requests.
  • Dashboards in about an hour in early tests with Claude, compared with manual BI work.

Team, Timeline and Budget

  • Team: the retailer's data team. The lead analyst wrote the reference queries, and the work was mostly an architecture task rather than plain coding.
  • Timeline: about 18 months for the first agent, including prompting, security approvals and message push. About a week to rebuild a comparable agent on a managed agent framework.
  • Project cost: about $45,000

Challenges

  • Overload under concurrent use. When several dozen people sent questions at the same time, the agent became overloaded and returned wrong answers. The team changed the architecture to fix it.
  • Schema changes. Someone renames a column or adds a new one. The warehouse had one sales column with VAT and one without. After a column update, the agent once picked the wrong one, and a director saw numbers 18 to 20 percent lower than reality. The team now asks table owners to write a description for every new column, so the agent can read it. Part of this risk is a human factor, not an AI factor.
  • Self-hosting did not pay off. The retailer's requests are standard, and technology is not its core business. A hosted model at a few hundred dollars a month was clearly cheaper than running its own model.
  • Reliability. The agent can still make mistakes, so critical numbers get a human check.

Where Conversational Analytics Applies

The same approach fits any retailer or e-commerce company whose data sits in a cloud warehouse and whose business users queue for the data team. Typical questions it handles well:

  • brand, category and store performance against prior years
  • tracking of new launches and exclusive brands
  • funnel and cohort questions, such as visit to purchase within seven days
  • real-time one-page views for a single launch or campaign

Companies comparing conversational analytics tools or a conversational analytics platform should start from their own question backlog. Teams with many narrow questions and few matching dashboards benefit the most, because each of those questions would otherwise be one more SQL request. For analytics built around the business decisions behind those questions, see our data analytics consulting services. For the agent itself, see agentic AI development.

Related Case Studies

About the Author

Vladislav Volovik — Data & Analytics Lead, Building Agentic

E-commerce data analyst at Sephora (LVMH Group) in Paris. Previously five years at Allianz Technology as a consultant, where he built BI solutions on SAP Analytics for IT cost optimization across the group. EDHEC Business School, MSc in Consulting & Digital Transformation. At Building Agentic he designs the data models and BI layer on every engagement — the part that decides whether reporting takes one click or one analyst.

Vladislav Volovik on LinkedIn

‍