Embedded Analytics and AI Chatbot on one semantic layer

The Cube x spyne user story.

spyne  logo
Embedded Analytics and AI Chatbot on one semantic layer
HQParis, France
StackGoogle BigQuery, ChatGPT, Vue.js
Use CaseLLM & AI Semantic Layer

AI-enabled embedded analytics on one semantic layer

Marketing channels have exploded. At first it was Google and Facebook, but today it’s LinkedIn, Snapchat, TikTok, and dozens more. Managing all of this complexity has become a challenge for marketers and growth teams. spyne is a business operations platform focused on making it easier for publishers, agencies, and marketers to monitor, manage, and understand campaign performance in a single interface. They take the data complexity out of the modern marketing landscape.

As a core part of their offering, spyne wanted to share insights with customers through detailed dashboards.. They quickly realized that they needed to have full control of the visualizations to deliver the experience they were looking for.

“We didn’t want to use Tableau, Power BI or Looker Studio. We needed our own tool integrated completely within our platform.” - Patrice Navarre, CTO and co-founder of spyne

When rendering dashboards for an embedded application, every millisecond adds up and impacts the customer experience.

Marketing Operations teams have long struggled with collecting and bringing together data from a growing digital landscape and integrating it into a consistent data model. Customers come to spyne having already tried to build dashboards using their own mix of analytics tools, including common BI tools.

“Our purpose is to make that simpler - you just open your account, plug your sources and you get your dashboards. You don't have to worry about anything else.”

In addition to simplifying the data model, spyne knew that application performance would be critical in keeping customers happy. With Google BigQuery as their warehouse, and a custom front-end integrated into their product, they began looking for ways to accelerate queries with pre-aggregations and caching.

“BigQuery is extremely scalable, but sometimes it takes half a second and up to one second to perform a query. We have up to a few hundreds queries on some of the more complicated client dashboards. That is where query caching can make a huge difference.”

They discovered Cube Cloud in their search for query acceleration.

The team at spyne got Cube Cloud working quickly and proved that it would be a valuable addition to their embedded analytics stack. In less than an hour, the front-end team was able to create a data model, retrieve a token, and build a test. In one day spyne started building on Cube Cloud.

Today, Cube Cloud accelerates all of the campaign data held in Google BigQuery and then customers interact with that data through spyne’s custom front end interface. spyne offers many pre-built dashboards, and customers can build their own dashboards using a custom dashboard designer spyne provides.

“While we offer the ability for customers to create their own dashboards, we don’t want customers - or even our front-end developers - to have to create complex SQL queries themselves. They just graphically configure their charts and reports, and Cube does the job of turning these into complex SQL queries on our warehouse.”

The spyne team also acknowledges Cube is a great tool to optimize query cost in Google BigQuery.

Developing new functionality with Open AI

In addition to their core dashboarding capabilities, spyne has expanded into an AI offering where customers can interact with their data through natural language questions and get intelligent commentary on how marketing campaigns are going. This solution relies upon the reasoning powers provided by OpenAI.

While the spyne team was concerned that it might be difficult to teach an LLM how to understand the data that was available within Cube, and to form valid queries to answer users questions, it ended up being rather straightforward to solve these problems. First, to handle discovery of what data is available, Cube provides a meta API endpoint to inspect the contents of a data model in a structured way. As for removing the need to have the LLM write complex SQL, the team elected to build requests using the REST API endpoint and the model was able to generate perfectly tailored queries to answer any question.

How does it work for customers?

Customers now can ask a question in natural language from a simple search bar, and spyne delivers two answers. The first one are charts - different types of charts depending on the question.

“If you ask what the performance was day by day last month, then you get a line chart. You say, please compare the performance across my strategies. Then you get a bar chart. If you say, what's the breakdown of a specific dimension then you get a donut or a pie chart and so on.”

The second answer provides commentary on those charts by interacting with OpenAI.

Screenshot from spyneAI, where they leverage OpenAI and teach the Cube data model.

spyneAI chatbot


spyne discovered Cube Cloud in their search for performance gains on top of BigQuery, but over time came to appreciate the dynamic query generation, pre-aggregation, multi-tenant security contexts and robust API-endpoints that Cube Cloud provides. By investing in a strategy that centered the semantic layer in their application design, they were able to go all in on building their own custom dashboard package which includes static dashboards as well as an advanced custom dashboard builder their customers love.

When AI showed up on the scene, the team at spyne was well positioned to get an AI-enabled analytics feature to market in their app faster than their competitors, delighting their customers and demonstrating their value as a partner to marketers everywhere.

“Cube has been great. Not only has Cube improved query performance on BigQuery from a few seconds to milliseconds, but it made it possible for us to quickly roll out our spyneAI assistant”

Ready to upgrade your data stack?

Related Use Cases

Check out Cube’s other solutions

Related Blog Posts

Stay up-to-date with the latest from Cube