Chapter 2 of 4 · Snowflake GES-C02

Snowflake Gen AI Functions

Cortex AI functions, task-specific and vector functions, helpers, data analysis use cases and performance.

  • 26topics
  • 1 h 47 minfast track
  • 5diagrams and exhibits
  • 38%of the exam

Topics in this chapter

Take them in order, or jump to the one you need.

  1. 1Snowflake Cortex AI Functions - Families, Access and Error HandlingLearn how Snowflake Cortex AI functions are grouped, which privileges and database roles you need to call them, and how they…Diagram5 min
  2. 2AI_COMPLETE - Text, Image and Prompt Object CompletionsUse AI_COMPLETE for general LLM prompts in SQL. Know its three input forms, model parameters and defaults, Cortex Guard…4 min
  3. 3Structured Outputs for AI_COMPLETE - JSON Schemas and Type LiteralsForce AI_COMPLETE to return JSON that follows your schema. Know response_format, JSON schema rules, type literals, model notes…4 min
  4. 4Task-Specific Functions - AI_CLASSIFY, AI_SENTIMENT and AI_FILTERChoose the right task-specific Cortex function for labels, sentiment and yes/no filtering. Know categories, output modes, limits…4 min
  5. 5AI_EXTRACT and AI_PARSE_DOCUMENT - Pull Data Out of Text and FilesKnow when to use AI_EXTRACT for questions and tables and AI_PARSE_DOCUMENT for OCR, LAYOUT and AGENTIC parsing, with arguments…5 min
  6. 6SUMMARIZE, AI_SUMMARIZE_AGG and AI_AGG - Condensing Text Across RowsPick between SUMMARIZE and AI_SUMMARIZE for one value, and AI_SUMMARIZE_AGG or AI_AGG for many rows. Know syntax, GROUP BY use…Diagram4 min
  7. 7AI_TRANSLATE, AI_TRANSCRIBE and AI_REDACT - Language, Audio and PIIUse AI_TRANSLATE for languages, AI_TRANSCRIBE for audio and video, and AI_REDACT to mask PII. Know arguments, limits, return…4 min
  8. 8AI_EMBED and AI_SIMILARITY - Embeddings and Semantic ComparisonCreate vector embeddings with AI_EMBED and compare text or images with AI_SIMILARITY. Know models, input types, return values…4 min
  9. 9VECTOR Data Type and Similarity Functions - Inner Product, L1, L2 and CosineUnderstand the VECTOR type and the four vector similarity functions. Know which are higher is closer or lower is closer, plus…Diagram4 min
  10. 10VECTOR_TRUNCATE, VECTOR_NORMALIZE and Vector Aggregates - SUM, MIN, MAX, AVGLearn the vector manipulation and aggregate functions: shorten and normalize embeddings, and combine vectors per element with…4 min
  11. 11Helper Functions - AI_COUNT_TOKENS and TRY_COMPLETEEstimate token use before a large run with AI_COUNT_TOKENS and handle model errors with TRY_COMPLETE. Know syntax, limits…4 min
  12. 12Text Splitting - SPLIT_TEXT_RECURSIVE_CHARACTER and SPLIT_TEXT_MARKDOWN_HEADERChunk text for embeddings and Cortex Search with SPLIT_TEXT_RECURSIVE_CHARACTER and SPLIT_TEXT_MARKDOWN_HEADER. Know arguments…4 min
  13. 13TO_FILE and PROMPT - Building File References and Prompt ObjectsUse TO_FILE to create FILE values from staged files and PROMPT to build prompt objects with placeholders for AI_COMPLETE…4 min
  14. 14Data Analysis Use Cases with Fully Managed LLMs, RAG and Text-to-SQLMatch a data analysis use case to the right Snowflake managed service: AI functions, Cortex Search for RAG, or Cortex Analyst for…4 min
  15. 15Unstructured Data Analysis with AI_PARSE_DOCUMENT, AI_EXTRACT, AI_SIMILARITY and AI_COMPLETEChoose between AI_PARSE_DOCUMENT, AI_EXTRACT, AI_SIMILARITY and AI_COMPLETE to analyze documents, text and images stored on a…4 min
  16. 16Cortex Search for Unstructured Data: Chunking, Embedding Models and RerankingBuild a Cortex Search service over documents: split text recursively, size chunks, pick an embedding model and understand hybrid…Diagram4 min
  17. 17Multi-modal Analytics: Audio and Image Processing with Cortex AI FunctionsAnalyze audio and images in Snowflake: transcribe with AI_TRANSCRIBE, describe or classify images with AI_COMPLETE, and embed…4 min
  18. 18Structured Data Analysis with AI_COMPLETE, Cortex Analyst and Verified QueriesAnalyze structured data in Snowflake with AI_COMPLETE structured output, Cortex Analyst semantic views and the Verified Query…4 min
  19. 19Cortex Analyst with Cortex Search, Suggested Questions and Custom InstructionsTune Cortex Analyst: link dimensions to Cortex Search for literal values, use suggested and onboarding questions, and steer SQL…4 min
  20. 20Performance: Model Choice, Latency, Accuracy and Provisioned ThroughputBalance model size, latency, accuracy and capability in Snowflake Cortex, and know when fine-tuning, RAG or Provisioned…4 min
  21. 21Building Chat Interfaces: Environment Setup, Privileges and Streamlit in SnowflakeSet up a Snowflake account for Cortex chat apps: required roles and privileges, region and model access, and calling Cortex from…4 min
  22. 22Chat Conversations: Multi-turn Architecture, Message History and Snowflake IntelligenceBuild multi-turn chat on stateless Cortex calls by resending the messages array, and know when to use Snowflake Intelligence to…5 min
  23. 23Applying Snowflake Cortex Functions in Data Pipelines with the SQL InterfaceRun Cortex AI functions inside Snowflake data pipelines with plain SQL, streams and tasks, controlling cost, errors and…4 min
  24. 24Data Extraction, Enrichment, Augmentation and Transformation with Cortex FunctionsMap each data pipeline task, extraction, enrichment, augmentation and transformation, to the right Cortex AI function and avoid…4 min
  25. 25Running Third-Party Models with Snowpark Container ServicesHost a third-party model in Snowpark Container Services: set up the environment, Docker image, specification file, compute pool…4 min
  26. 26Snowflake Model Registry: Logging a Model and Calling It for InferenceLog a third-party or custom model in the Snowflake Model Registry, then call it from Python, SQL or a Snowpark Container Services…Diagram4 min

About this chapter

What this chapter covers

Snowflake Gen AI Functions is the chapter on how you call generative AI from SQL and how you pick the right tool for a data task. For the SnowPro Specialty: Gen AI GES-C02 exam it tests decisions, not definitions: which Cortex function, which argument, which privilege, which service, and why.

Questions are scenarios that start with "A Gen AI Specialist needs to ...". They are single answer or multiple select, and the right answer usually turns on one detail such as a default, a limit, the return format or the function that already does the job.

How the topics fit together

Most work is a chain: files or text go in, a function turns them into text, labels or vectors, and the result is stored, searched or analyzed.

Stagefiles and textTO_FILE and PROMPTHelper functionsparse, extract, classifyTask specific functionsAI_*embed, compareVector functionsVECTOR typefeedSearch, analysis and pipelines
  • General and task specific functions cover AI_COMPLETE, structured outputs, classification, extraction, parsing, sentiment, summaries, translation, transcription and redaction.
  • Vector functions cover embeddings and the functions that compare, shorten and combine them.
  • Helper functions cover token counting, text chunking, file references and prompt objects.
  • Use cases and performance apply these functions to unstructured, multi modal and structured data, and to model choice.
Exam tip

When a scenario names one clear task, the task specific function is usually the intended answer. Choose AI_COMPLETE when the task is open ended or needs a custom output.

How to use these pages

Each topic page has the same shape, so you can skim for what you need.

  • What it is: the idea in plain words.
  • How it works: the mechanism, with diagrams, SQL and comparison tables.
  • Common mistakes: the classic traps.
  • What to remember for the exam: the facts to memorize.
  • Check yourself: three questions to test your understanding.

Read the function pages in order the first time. Later pages reuse TO_FILE, PROMPT and the embedding functions from the earlier ones.

Ready for more practice?

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.