At Rivery, we pride ourselves on delivering exceptional customer support. To maintain and improve our service, we continuously seek innovative ways to understand better and respond to our customers’ needs.
One of our latest initiatives involves leveraging the power of generative AI to analyze support tickets via Rivery and Snowflake Cortex.
Rivery is a complete data integration platform that simplifies and speeds up data pipeline creation by seamlessly integrating hundreds of data sources. This eliminates the complexities of building and maintaining connections between structured and unstructured data sources. By linking Rivery with Snowflake, we can efficiently extract data from different support systems, load it into Snowflake, and transform it so it’s ready for large language models (LLMs) usage.
This enables us to utilize Snowflake’s Cortex functions to perform analysis using LLMs on top of pertinent and current data from any source via simple SQL queries. With this capability, generative AI can utilize the retrieved information to answer specific questions regarding your data.
This blog post delves into why we are undertaking this initiative and how our engineering team utilized Rivery and Snowflake Cortex to summarize long text inputs from support tickets.
Why Analyze Support Ticket Data With AI?
One of the core differentiators of our product is the dedicated customer support we provide to our customers. This involves multiple support channels, often resulting in a ticketing system that handles customer tickets in a reasonable time.
- Understanding Customer Pain Points:
Support tickets are a rich source of information about the challenges our customers face. By analyzing this often unstructured data with AI, we can identify common issues, recurring themes, and areas where our product may need enhancement. This understanding helps us proactively address problems before they escalate, ensuring our customers have a smoother experience.
2 . Enhancing Response Times and Efficiency:
Smarter support ticket analysis allows us to track metrics such as average response and resolution times. By identifying bottlenecks and inefficiencies, we can streamline our support processes, allocate resources more effectively, and ultimately reduce the time customers spend waiting for resolutions.
3. Improving Product Development:
Insights gained from support ticket data can directly influence our product development roadmap. By understanding the features and functionalities that generate the most support queries, we can prioritize improvements and new features that address the real needs of our users.
4. Personalized Customer Support:
With detailed analysis, we can offer more personalized support. Understanding the history of a customer’s interactions with our support team enables us to provide tailored solutions and build stronger, more trusting relationships with our users.
Rivery and Snowflake Cortex enabling AI functionality
Without Rivery and Snowflake Cortex, this process could have been a hassle for data teams to complete. It would involve a data engineer having to set infrastructure and code to extract data out of the ticketing data source. Prepping the data and then running it via a dedicated workflow for generative AI would have additional another large undertaking.
The reality is that most data teams don’t have this luxury, and need a fast way for someone that knows SQL to perform all of this without relying on additional resources. Performing this process with Rivery and Snowflake is as simple as writing any SQL query.
Step 1: Extract and load the Data into Snowflake
The first step in our data workflow is to get the raw data from our support ticketing system to Snowflake to run further analyses on the text data. In this example the featured support ticketing system is Salesforce but it could also be Zendesk, Intercom, or any other system.
We do this by creating a Source to Target River (Data pipeline) in Rivery that loads the data from Salesforce to our target which is Snowflake. The steps are very simple:
- Configure a connection to your data source
- Configure a connection to your data-target
- Select what data to bring from the source
Here is a short video of how to create such a data pipeline.
In this case, we selected the following support ticket tables to be replicated from Salesforce to Snowflake. These tables contain free-form text fields such as the case comments and responses captured within email exchanges:
Step 2: Prepping the data & Running Cortex Functions
Next, we have to transform our data inside Snowflake which we can easily orchestrate via Rivery.
In the above process, we aggregate and concatenate the full history of case comments for each Case ID from the relevant tables into a single record instead of having separate records for each exchange related to the same support ticket (Case ID). This results in one unified set of all comments made on a specific ticket, which we can then use to run the cortex function.
From there, we can run a step that executes the Cortex functions to generate insights.
Let’s enlarge the SQL Query and preview the results:
For each ticket, we generate a summary to identify if the issue was resolved, what the resolution was, and whether the sentiment with the customer was positive, neutral, or negative.
One thing to note is that running Cortex functions has a maximum limit on the number of tokens you can send as input variables. You can think of tokens as the equivalent of words, and most algorithms have a 32,000 token limit. Some of the cases we had in our tickets were going over that limit and we had to define our business logic to deal with this limit.
Let’s quickly break down the various Cortex functions we used and what they are accomplishing.
Snowflake.Cortex.Summarize: Gets the full history of the ticket and summarizes it.
Snowflake.Cortex.Complete: A versatile function in Snowflake that lets you specify its tasks. In our case, we used it to analyze support tickets to determine if each ticket was resolved and to provide a summary of the resolution type. We also required the result to be a valid JSON containing one of three options with no additional text. Finally, we consolidated this information into a single field named “case resolution and sentiment” and loaded it into a final table in Snowflake.
Here is the full SQL Query we used in this case:
Moving Forward
By utilizing Rivery’s modern data integration platform, which seamlessly connects to hundreds of data sources, along with the LLM capabilities of Snowflake Cortex, we have effortlessly created a streamlined process to gain deeper insights into our customer support tickets. This enables us to provide superior support to our customers and continuously enhance our product to meet the ever-evolving needs of our users.
This process can be easily applied on top of any free-form unstructured text. Watch this short video to see a similar flow we put together on top of our product review data.
Ready to integrate and run generative AI on top of your data in Snowflake? Start here.