How to Use OpenAI GPT-5.6 in Snowflake Cortex AI for Data Insights and Drafts
A beginner-friendly walk‑through that shows you how to set up Snowflake Cortex AI and run GPT‑5.6 from SQL to turn raw data into useful insights and ready‑to‑use written drafts.
Hook: By the end of this guide you’ll be able to query a Snowflake table, ask GPT‑5.6 to analyse the results, and receive a short written draft you can copy straight into an email or report. This is aimed at anyone who works with data – whether you’re a sales rep, a teacher, or a small‑business owner.
💡 Tip: tap a step’s number when you finish it — a green tick appears and your browser remembers how far you got.
- A Snowflake account (free trial or paid tier) with the Cortex AI feature enabled.
- Access to a web browser on a laptop or desktop (mobile browsers work but the layout may differ).
- At least one table of data you want to explore (e.g., a
salestable). - No extra cost for the basic GPT‑5.6 calls; larger usage may require a paid Snowflake plan.
- Roughly 15 minutes to finish the whole process.
Open the Snowflake web console and locate Cortex AI
Sign in to your Snowflake account at app.snowflake.com and, once the dashboard loads, look for the top‑level navigation bar. You’ll see tabs like Databases, Warehouses, and Cortex; click the Cortex tab. After the click, a pane slides open on the right side showing “Cortex AI – Ask your data questions”. If you don’t see a Cortex tab, look for a menu labelled Data AI, Snowpark, or a gear‑icon that expands additional AI options. You’ll know it worked when a blank query editor appears with a hint that you can type “Ask GPT‑5.6”.

Create a new Cortex worksheet for your query
In the Cortex pane, click the New Worksheet button (usually a plus‑sign icon at the top‑right of the editor). The screen will refresh to show a fresh, empty worksheet titled “Untitled”. If the button isn’t a plus‑sign, look for any icon labelled New, Create Worksheet, or a blank page symbol. You’ll know it worked when the editor title changes to “Worksheet 1” and a grey line appears where you can start typing SQL.

Write a SQL query that calls the GPT‑5.6 function
In the new worksheet, type a SQL statement that pulls a sample of your data and passes it to the built‑in CORTEX.GPT5_6 function. The function takes two arguments: a prompt (the question you want the model to answer) and a context (the data you’re feeding it). For example, to get a short sales insight you could write:
When you run the query, Snowflake sends the prompt and the aggregated rows to GPT‑5.6. If the function name or syntax looks slightly different, look for any function that mentions GPT5 or CORTEX.AI in the auto‑complete drop‑down. You’ll know it worked when the query returns a single column named GPT5_6_RESPONSE with a text block inside.

Execute the query and read the AI‑generated insight
Click the Run button (a triangular “play” icon) or press Shift + Enter. Snowflake will process the request; a progress spinner appears at the bottom of the editor. After a few seconds you’ll see a result grid with one row and a column of natural‑language text. If the spinner never disappears, check your network connection and retry; sometimes the free tier limits concurrent calls. You’ll know it worked when the text reads something like “In September 2024 the top three categories were Electronics, Furniture, and Clothing, together contributing 58 % of total revenue.”

Copy the AI draft into a document or email
Select the text inside the GPT5_6_RESPONSE cell (click once, then press Ctrl + C on Windows or Cmd + C on macOS). Open your favourite text editor, email client, or a Snowflake Snowsight notebook, and paste the content (Ctrl + V / Cmd + V). The draft is ready to be edited or sent as‑is. If you don’t see a copy option, look for a three‑dot menu next to the cell that offers “Copy value”. You’ll know it worked when the pasted material matches the AI‑generated insight you just saw.

- Skipping the “New Worksheet” step – you might type directly into a read‑only view. Fix it by creating a fresh worksheet as described in Step 2.
- Using the wrong function name – older docs show
CORTEX.GPT5, but the current function isCORTEX.GPT5_6. If you get an error, replace the name accordingly. - Expecting the model to write a full report – GPT‑5.6 can draft a short summary but not a multi‑page document. Keep the prompt concise, and expand the output manually if you need more detail.
Open your Snowflake console, create a new Cortex worksheet, and run the example query from Step 3. In under two minutes you’ll have a short, AI‑written insight you can copy straight into an email. Happy analysing!
Keep reading
✦ Original step-by-step guide by AI World HQ's AI editorial team. Written in plain language, reviewed for accuracy.
← Back to all stories