Setting up your environment
1. Setting up your environment
Welcome back. Imagine you're a data scientist working at a telecommunications company called Telco. Your responsibility is to provide AI-driven insights for your stakeholders so that they can make strategic decisions to increase customer satisfaction. Recently, there has been a surge of support tickets. The company receives support tickets via phone and email, and then the support team manually reviews and responds to the customer complaints. This process is slow and manual. You, as a data scientist, need a way to automate the analysis of support tickets and generate an email or text response to these customers. Instead of writing a complex rules engine or asking our teams to manually analyze those tickets and write custom responses for each, we can use LLMs, which are designed to handle complex language tasks just like this. We have two main tasks in front of us. One is to analyze the support tickets and understand customer issues. Second is to automatically generate a custom response for every support ticket to resolve the issue. Before we dive into how to solve these two problems as a data scientist, let us investigate the support ticket dataset. Currently, the support tickets are landed in an S3 bucket. We are going to load this dataset into a snowflake table for analysis. In this video, we will set up our snowflake environment, load the dataset into a snowflake table, and prepare it for further analysis. Now, you should pause the video to log into your Snowflake free trial account. Once you're logged into Snowflake account, navigate to the companion Git repo for this course. You can find the link to the Git repo in the reading section prior to this video. In the Git repo, under Module 3, you will find two IPython notebooks. The first notebook is for loading the support ticket dataset from the AWS S3 bucket into Snowflake. The second notebook is for fine-tuning the Mistral 7b model. Now, switch to your Snowflake account. Select the Data tab from the left panel and navigate to Databases. On the top right, click on the Create Database button and type in telco_support_db for the database name and click Create. You can see the telco support db listed in the databases now. Click on the downward arrow next to the telco support db. It has two default schemas, information schema and public schema. Let us now create a new schema within the database. Click on the Create Schema button at the top right. Type in support_data for the schema name and click Create. You can click on the support data and it shows no object found. This is because we haven't created any Snowflake objects under this schema. Now, navigate to Projects on the left panel. Select Notebooks. Move to the top right and click on the down arrow. Select Import IPython Notebook file and upload the load support tickets notebook into your Snowflake account. Select the telco support db and support data for the notebook location. Great. Next, let's load the fine-tuning Mistral notebook into Snowflake. Follow the same steps as above and select the telco support db and support data for the notebook location. All right. With both the notebooks in our Snowflake account, it is time to load the dataset into Snowflake. Click on the notebook titled Load Support Tickets and select the Start button at the top right to start the notebook session. It takes a couple of seconds. Click on Packages at the top right and search for Snowflake package to install. It takes a couple of seconds. First, we import the active Snowpark session and then set the context for the rest of the notebook cells to use the telco support db and support data schema. After that, we will create a CSV file format so Snowflake knows how to read the support tickets dataset that is stored in CSV files in the AWS S3 bucket in this specific location. Next up, we create an external stage in Snowflake to hold the data from the S3 bucket. And now is the time to create the support tickets table in Snowflake. This table will store the support ticket data. Once we have the table created, it is finally time to copy the data from the external stage into this Snowflake table. That is it. So far, we logged into our Snowflake account, loaded the customer support tickets from an S3 bucket into a Snowflake table. We have everything we need to analyze the support tickets and help our support team. In the next video, we will explore what the dataset looks like. We will also use Cortex LLM functions we learned earlier in the course to review and analyze the support tickets. See you there.2. Let's practice!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.