Week 156 - AI_EXTRACT

Challenge

It transpires that teaching just isn't the profitable industry it once was. Gone are the days when Professor Frosty could demand a limosine transport him to lectures, and was wined and dined by Silicon Valley's finest.

In an effort to repair his financial fortunes, he's decided to enlist Intern Mike in a, so called, "side hustle".

The pair will use the AI power of Snowflake to become traders. Help them build an AI entity extraction model, using Snowflake's 2025 Annual Report.

Assignment

Ingest the Snowflake 2025 Annual Report PDF into a Snowflake stage (you can delete and use AI_EXTRACT to extract both executive leadership names and fiscal year 2025 financial metrics directly from the document.

Setup Code

Setup Code (click me)
-- Setup
USE ROLE SYSADMIN;

CREATE OR REPLACE DATABASE FROSTY_DB;
CREATE OR REPLACE SCHEMA FROSTY_DB.WEEK_156;

USE DATABASE FROSTY_DB;
USE SCHEMA WEEK_156;

CREATE OR REPLACE STAGE ANNUAL_REPORTS
    DIRECTORY = (ENABLE = TRUE)
    ENCRYPTION = (TYPE = 'SNOWFLAKE_SSE');
PUT file:///path/to/Snowflake-2025-Annual-Report-and-Proxy-Web-Version.pdf @ANNUAL_REPORTS;
ALTER STAGE ANNUAL_REPORTS REFRESH;

Your Objective

Step 1: Upload the PDF to the stage

Download the Snowflake 2025 Annual Report and Proxy Statement and upload it to your @ANNUAL_REPORTS stage. Refresh the directory table afterwards.

Step 2: Extract Executive Leadership

Write a single AI_EXTRACT query against the PDF file on stage to answer all of the following:

  • Who is the Chief Executive Officer and Director?
  • Who is the Chief Financial Officer?
  • Who is the President of Products and Director?
  • Who is the Chief Revenue Officer?
  • Who is the EVP, Product Management?
  • Who is the SVP, Engineering and Support?
  • What was the PRODUCT REVENUE?
  • What was the NET REVENUE RETENTION RATE?
  • How many $1M CUSTOMERS did Snowflake have?
  • How much was there in REMAINING PERFORMANCE OBLIGATIONS?
🧊 I'm Stuck β€” Help! (Click me)

πŸ’‘ Use AI_EXTRACT with file => and a simple object response format like {'ceo': 'Who is the CEO and Director?', ...}. Reference the file with TO_FILE('@FROSTY_DB.WEEK_156.ANNUAL_REPORTS', 'Snowflake-2025-Annual-Report-and-Proxy-Web-Version.pdf').

Expected Output:

Step 4: Verify Your Results

Confirm that your extracted values match the expected outputs above. The executive names should be exact matches and the financial figures should correspond to the Business Highlights section of the annual report.

Hints

  • AI_EXTRACT works directly on staged files β€” no need to parse or load the PDF into a table first.
  • Use TO_FILE() to reference a file on a stage.
  • The directory table must be enabled and refreshed for TO_FILE() to work.
  • You can combine all questions into a single AI_EXTRACT call using an object response format.
  • Docs: AI_EXTRACT
Next
Next

Week 155 - Cortex AI Functions USAGE