Work / 01 Leading FMCG beauty brand
Analysts and marketers at a leading FMCG beauty brand waited on SQL and slow tools for every question. We built an assistant that turns a plain-English question into SQL, runs it, and answers with a chart in under three seconds.
- Client
- Leading FMCG beauty brand
- Engagement
- 5 months
- Delivered
- 2024
ServicesApplied AI ApplicationsAnalytics
- Query response time6× faster
- SQL accuracy87.2%
- Time to improve a marketing campaign−45%
The brief
What they came to us with.
The brand held a great deal of data, but the tools on top of it were slow and inflexible. Finding the right tables in a complex structure took time, in-depth analysis was labour-intensive, and charts were limited by what the tools could draw.
Insights stayed inside the teams that found them. Decisions were delayed, campaign opportunities were missed, and non-technical colleagues had no direct route to the data.
Constraints
- Non-technical users never write or see SQL
- Answers in seconds, not minutes
- Every answer runs against the brand’s own data
- Charts built on the fly, with no dashboard to commission
Before and after
What actually changed.
The same teams and the same data, before and after the assistant.
What we did
How the assistant answers.
- 01
Teach the model the business’s language
We fine-tuned a large language model on the brand’s own SQL and business vocabulary, so “top sellers in the north last quarter” maps to the right tables, filters and metrics instead of a generic guess.
Fig. 1 From a business question to SQL on the warehouseDiagram - 02
Ground every answer with retrieval
A retrieval layer (RAG) hands the model the schemas, metric definitions and example queries that matter for each question. Answers draw on the whole data estate and stay relevant as tables change.
Fig. 2 What the retriever supplies for each questionDiagram - 03
Answer with a chart, not a table
Every question returns the answer and an interactive visual generated on the fly. People see the pattern straight away and share the chart with colleagues, without waiting for a dashboard to be built.
Fig. 3 A question and the chart that answers itDiagram
How it ran
How the work was paced.
Data first, then the model, then the people who use it.
Discovery and data audit
Map the data estate and the questions people ask.
Model fine-tuning
Tune on the brand’s SQL and business language.
Retrieval and evaluation
Add RAG and test on questions the model has not seen.
Rollout and handover
Charts, access for each team, documentation, training.
Outcome
What it changed.
Compared with the previous chatbot and the pre-launch baseline.
Query response time
6× faster
Before~18 sAfter< 3 s
How measured: Median response time on the same set of questions, previous chatbot against the assistant.
SQL accuracy
87.2%
BeforeUntuned modelAfter87.2%
How measured: Share of correct SQL on out-of-sample questions the model had not been tuned on.
Time to improve a marketing campaign
−45%
BeforeBaselineAfter55% of baseline
How measured: Time from asking for an insight to changing a campaign, before and after launch.
Built with
PythonEverything glued together
Node.jsServices and APIs
ReactWeb interfaces
What we would tell the next team
- Tuning on the brand’s own SQL and vocabulary mattered more than choosing a bigger model.
- Retrieval kept answers correct as tables and metrics changed, with no retraining.
- A chart with every answer is what got non-technical teams to trust it and share it.
More work
Contact
Book a free 15-minute call to talk through what you are working on.
How we connect
- 01Book a short call
Choose a time that works for you on our calendar.
- 02Discovery call
A short call to understand the problem, the people and the constraints.
- 03Final scope and kickoff
We send a clear scope and cost. Once you agree, we start.
Office
393, WeWork Vijohn Tower, 3rd FloorUdhyog Vihar Phase-4, GurugramHaryana 122016
Follow