How a digital advertising firm uses text-to-sql to extract insights
Description
Provider of one of the largest customer data platform for digital advertising in the world
Industry
Advertising
Size
1,200+
Customer since
Integrations
Opportunity
A US-based digital advertising firm sought to streamline the process of generating analytics reports for their customers.
Analysts spent an average of 2 hours daily per person building reports based on SQL queries run on databases containing end-user information.
Each analyst had to formulate the SQL query and perform 2 to 6 trials to extract the correct information from their Snowflake database.
Solution
They partnered with Stack AI to develop an AI assistant powered by a Text-to-SQL model.
With Text-to-SQL capabilities, users can query in natural language, simply asking for the data they need. The assistant calculates audience sizes, shows purchase trends, and performs other previously time-consuming tasks.
The AI assistant democratizes data access, eliminating the need for users to write SQL queries.
Use Case Architecture
The solution's architecture included a Text-to-SQL model (developed by Stack AI) that transforms the user's question into an SQL query, which is then run against a Snowflake database. The retrieved information is sent to a Large Language Model (Azure OpenAI GPT-4), which drafts a natural language response for the user, including the SQL query, results, and an explanation.
Chart generation was enabled allowing the Large Language Model to plot trends upon request.
The AI assistant was developed in Stack AI with enterprise-grade security, ensuring a secure connection to Snowflake databases and data confidentiality.
Results
The AI assistant reduced query development time by approximately 65%, saving over ~300 hours per analyst per year, resulting in significant cost savings.
On the revenue side, the company introduced a premium service offering that converts non-technical user questions into answers. Similar companies offer these services for around $2,000 per customer per year, leading to additional annual recurring revenue.