Snowflake Cortex AI Overview

Companies want to summarize reviews, search documents, and ask questions of data in plain English. Moving data to outside AI tools creates security and cost problems. Snowflake Cortex brings language models and search services inside the platform, so data stays under the same roles, policies, and audit trails as everything else.

The Built-In Assistant Comparison

Imagine an office where every department shares one secure building. Bringing in an outside consultant means handing over files at the door. Cortex acts as a consultant who works inside the building. The files never leave, and the consultant follows the same security badge rules as every employee.

THE CORTEX FAMILY
=================

 +--------------------------------------------------------------+
 |                    SNOWFLAKE CORTEX                          |
 |                                                              |
 |  AI SQL FUNCTIONS     call a model from a SQL query          |
 |  CORTEX SEARCH        find the best passages in documents    |
 |  CORTEX ANALYST       turn plain questions into SQL          |
 |  CORTEX AGENTS        plan steps and use the tools above     |
 |  DOCUMENT AI/PARSING  read PDFs and scanned files            |
 +--------------------------------------------------------------+
        |                       |                       |
        v                       v                       v
   Your tables and documents, protected by Snowflake roles

The Main Building Blocks

FEATURE            WHAT IT DOES                         WHO USES IT
-----------------  -----------------------------------  ------------------
AI SQL functions   Summarize, classify, translate,      Analysts writing SQL
                   extract, and complete text per row
Cortex Search      Hybrid keyword and meaning search    App builders
                   over text, ready for RAG
Cortex Analyst     Answers business questions with SQL  Business users, apps
                   using a semantic model
Cortex Agents      Combines tools to answer multi-step  App builders
                   questions
Document parsing   Converts PDFs and scans into text    Data engineers

Snowflake ML is a separate area for training and deploying custom machine learning models. Cortex focuses on ready-made, hosted AI.

How Access Works

Access to Cortex functions flows through the SNOWFLAKE.CORTEX_USER database role. Administrators decide which roles hold it.

GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO ROLE analyst_role;

Cortex Analyst uses its own role, SNOWFLAKE.CORTEX_ANALYST_USER, so teams can allow one capability without the other. Normal table permissions still decide what data a query can read.

A First Taste

SELECT AI_COMPLETE(
  'llama3.1-8b',
  'Summarize in one sentence: The delivery arrived two days late and the box was damaged.'
) AS summary;

The call sends the prompt to a hosted model and returns text. Model names change over time, and availability varies by region, so check the current model list in the documentation before choosing one.

Cost Basics

Cortex features bill by usage. Language functions charge by the number of tokens, which are small pieces of text counted on input and output. Search services charge for serving and indexing. Analyst and agents charge by request volume and by the compute that runs generated queries. Test on a handful of rows first, since a function applied to millions of rows multiplies the cost.

COST HABITS
===========
1. Test prompts on LIMIT 10 rows
2. Pick the smallest model that does the job
3. Keep prompts short and specific
4. Run bulk jobs once and store results in a table
5. Monitor Cortex usage views on a schedule

Governance and Safety

  • Data stays inside the Snowflake security boundary during Cortex processing.
  • Masking and row access policies apply to the role running the query.
  • Model outputs can contain mistakes, so review results before business-critical use.
  • Avoid sending highly sensitive text to models unless policy allows it.
  • Log prompts and results for important workflows, so reviewers can audit them.

Choosing the Right Tool

YOUR GOAL                                      START WITH
---------------------------------------------  ----------------------
Label thousands of support tickets             AI SQL functions
Search company manuals and answer questions    Cortex Search + AI_COMPLETE
Let managers ask sales questions in English    Cortex Analyst
Handle questions that need several steps       Cortex Agents
Turn scanned invoices into rows                Document parsing

A Practical Scenario

A retailer collects fifty thousand product reviews each month. An analyst uses AI functions to classify each review by topic and sentiment, and stores the results in a table. A dashboard shows complaint trends by product. The same company later adds Cortex Search over its policy documents so support staff can find answers in seconds. All steps run inside the existing Snowflake account, under the existing roles.

Frequently Asked Questions

Does Cortex train models on my data?

Snowflake states in its documentation how customer data is handled for Cortex features. Read the current terms and the data protection section before processing sensitive content.

Can I use Cortex without writing code?

Some experiences in Snowsight need no code. Building custom apps and pipelines uses SQL for functions and Python or REST calls for search, analyst, and agents.

Key Points

  • Cortex runs AI features inside Snowflake's security boundary.
  • AI SQL functions, Search, Analyst, and Agents cover different jobs.
  • Database roles control who can use each feature.
  • Usage bills by tokens, requests, and supporting compute.
  • Test small, review outputs, and respect data policies.
  • Model names and regional availability change, so verify against the documentation.