Snowflake for Gen AI · Topic 1 of 13
Gen AI Principles, Snowflake Cortex, Models and Fine-tuning
Snowflake Gen AI principles, what Snowflake Cortex is, how Cortex models and AI functions are called, and what Cortex Fine-tuning does and its limits.
- 4 min
- Cortex = managed LLMs, embeddings, Search, Analyst, Agents inside the Snowflake perimeter.
- AI functions need
USE AI FUNCTIONSplusCORTEX_USERorAI_FUNCTIONS_USER;CORTEX_USERis granted to PUBLIC by default. AI_COMPLETEis the updatedCOMPLETE.
What it is
Snowflake Cortex is the managed AI layer inside Snowflake. It gives you large language models, embedding models, search, text-to-SQL and agents without moving data out of the platform or running your own GPU servers. The exam starts here: a Gen AI Specialist must know what the layer offers and which piece fits a requirement.
Snowflake's Gen AI approach rests on three ideas. The data stays inside the governed Snowflake perimeter, the models run as a managed service, and the features are reached through the interfaces you already use (SQL, Python, REST and Snowsight). Existing access control applies, so a role that cannot see a table cannot use it through an AI feature either.
How it works
The Cortex building blocks
| Block | What it does | Typical user |
|---|---|---|
| Cortex AI functions (AISQL) | Row level or aggregate AI operations called from SQL | Analyst, data engineer |
| Cortex Search | Hybrid search service over text, used for RAG | App builder |
| Cortex Analyst | Natural language to SQL over structured data | Business user, app builder |
| Cortex Agents | Plan, call tools and answer across data sources | App builder |
| Cortex Fine-tuning | Adapt a base model with your own examples | ML engineer |
Cortex models and functions
The AI functions are SQL functions, and each one is a task, not a model. AI_COMPLETE generates a completion with a model you name. AI_CLASSIFY, AI_FILTER, AI_AGG, AI_EXTRACT, AI_SENTIMENT, AI_SUMMARIZE, AI_SUMMARIZE_AGG, AI_TRANSLATE, AI_REDACT, AI_TRANSCRIBE, AI_PARSE_DOCUMENT, AI_EMBED, AI_MULTI_EMBED and AI_SIMILARITY cover the other common tasks. AI_COUNT_TOKENS and the PROMPT helper support them.
AI_COMPLETE is the updated version of the older COMPLETE function. The older names (COMPLETE, SUMMARIZE, EMBED_TEXT_768) still appear in the syllabus and in older material, so read them as the earlier forms of the same ideas.
The models are hosted by Snowflake and come from several providers. Snowflake states that they run inside its security and governance perimeter, so your data stays under Snowflake's controls.
SELECT AI_COMPLETE('llama3.3-70b',
'Summarize this ticket in one sentence: ' || ticket_text) AS summary
FROM support_tickets;
When a question asks for the function, match the verb. Classify, filter, extract, summarize, translate and redact each have a dedicated AI_* function. Use AI_COMPLETE only when no task function fits.
Access to the functions
To call a Cortex AI function a role needs the USE AI FUNCTIONS account level privilege and one of the SNOWFLAKE.CORTEX_USER or SNOWFLAKE.AI_FUNCTIONS_USER database roles. Per feature roles exist too, for example SNOWFLAKE.CORTEX_ANALYST_USER for Cortex Analyst only. CORTEX_USER is granted to PUBLIC by default, so every user has it until an administrator revokes it and grants the narrower role.
Cortex Fine-tuning
Fine-tuning customizes a base model with your own examples, using parameter efficient fine-tuning (PEFT) to produce an adaptor. The syllabus lists it as Public Preview. The current documentation shows it as generally available in three regions (AWS US West 2, AWS Europe Central 1 and Azure East US 2) and says it is scheduled for deprecation in Q1 2027, with Cortex Training recommended for all LLM fine-tuning.
- Function:
SNOWFLAKE.CORTEX.FINETUNEwith the actions CREATE, SHOW, DESCRIBE and CANCEL. - Training data: a table or view whose query returns columns named
promptandcompletion. Other columns are ignored. - Base model: the documentation names
llama3.1-8b. - Privileges: USAGE on the source database, CREATE MODEL on the target schema, and the
SNOWFLAKE.CORTEX_USERdatabase role. - Use the result: pass the fine-tuned model name to
AI_COMPLETE.
Fine-tuning does not support cross-region inference. The tuned model runs in the region where it was trained, and other regions need the model replicated. If the base model is later removed from the Cortex functions, the fine-tuned model stops working. Usage is tracked in the CORTEX_FINE_TUNING_USAGE_HISTORY view.
Fine-tuning teaches style and task format. It does not reliably add new facts. For fresh or private knowledge, retrieval (Cortex Search) is the better answer.
Common mistakes
Calling Cortex a separate product with its own data copy. Data stays in Snowflake and normal RBAC applies.
Treating each model as a function. Models are arguments to AI_COMPLETE; the other functions name a task.
Fine-tuning to add knowledge. Use RAG for changing or private facts.
Using the old name only. COMPLETE and AI_COMPLETE are the old and new forms; the exam may show either.
Expecting cross-region inference for a tuned model. It is not supported for Cortex Fine-tuning.
What to remember for the exam
- Cortex = managed LLMs, embeddings, Search, Analyst, Agents inside the Snowflake perimeter.
- AI functions need
USE AI FUNCTIONSplusCORTEX_USERorAI_FUNCTIONS_USER;CORTEX_USERis granted to PUBLIC by default. AI_COMPLETEis the updatedCOMPLETE.- Fine-tuning data columns are
promptandcompletion; the function isSNOWFLAKE.CORTEX.FINETUNE. - A fine-tuned model is called through
AI_COMPLETEby name and needs its region.
Check yourself
Which role restricts a user to Cortex Analyst only?
Revoke
CORTEX_USERfrom PUBLIC and grantSNOWFLAKE.CORTEX_ANALYST_USER.What columns must fine-tuning training data return?
promptandcompletion; other columns are ignored.How is a fine-tuned model used in SQL?
By passing its name as the model argument to
AI_COMPLETE.
Topic 1 of 13 in Snowflake for Gen AI
Test yourself on Snowflake for Gen AI
The full Snowflake GES-C02 question bank has 585 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Snowflake. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.