After you installed the application and created your view, it's time to create your first AI agent.
In this article, you will build a demo Snowflake AI Agent for data analysis.
1. Creating a sample database (optional)
π‘ You may skip this step if you already created a view.
In this step we will be creating a sample database and a sample view. We will be using this data in the following steps to create our first AI agent. Sign in to your Snowflake account and create a new SQL Worksheet.
To start, copy the SQL Script and paste it into the SQL Worksheet, then click on the Run All button to execute the script.
This script will:
Create a Database called zoom_cancellations and populate it with demo data
Create a Database called zoom_users and populate it with demo data
Create a View called zoom_cancellations_view to connect the data from both tables
After the script has successfully executed, you will see a LANG_AI_DEMO database with the following tables and one view:
In this example, we are creating a simple view with the fields id, text, creation_date, user_id, and Customer_Spend.
The last column Customer_Spend is not mandatory, but it is included as we will configure the agent to use it to group the insights by the customer monthly spending.
2. Creating Your First AI Agent
Select Your AI Agent
Choose the AI agent that aligns with your goal. Once selected, you will be prompted to choose the attributes that will be used to segment the insights. For example, selecting "subscription plan" will ensure insights are generated with this in mind, helping the AI agent identify patterns relevant to your business objectives.
Connect to Slack (optional)
The final step is to connect your AI agent to a Slack channel. This will enable the AI agent to send new insights directly to the selected Slack channel, keeping you informed in real-time. Note that this step is optional. Learn more here.
After you've successfully created and run an agent, the system will automatically send the insights to the Slack channel you specified during setup.
β
β
3. Running your AI Agent for the First Time
After completing the setup and creating your first agent, you're ready to run it for the first time.
To manually run your agent, click on Run Agent. The demo data has comments from July 2024, so make sure to select the entire month.
4. Reviewing the Insights of Your AI Agent
Navigate Your Agent Insights
Once the agent has finished processing, click on table to see the generated insights. In the insights view, you can navigate through the data by sorting and searching.
Review the Data Associated with the Insights
To view the unstructured text that was analyzed to generate an insight, simply click on the specific insight.
Additionally, you have the option to download the data from your active filters by clicking on Download CSV.
Related Resources