Skip to main content

Cortex Architecture and Capabilities

Snowflake Cortex is a fully managed, intelligent service that puts industry-leading Large Language Models (LLMs) and advanced Machine Learning algorithms directly into the hands of data professionals. Instead of moving your data to external AI providers or managing complex infrastructure, Cortex brings the AI directly to your data.


Why Snowflake Cortex?​

Historically, implementing Generative AI pipelines required:

  1. Extracting data out of your data warehouse.
  2. Sending that data over the public internet to APIs like OpenAI.
  3. Managing API keys, handling rate limits, and dealing with massive egress costs.
  4. Exposing sensitive company data to external vendors.

Snowflake Cortex solves this by providing managed models within the Snowflake service perimeter.

Key Benefits​

  • Governed Processing: AI workloads use Snowflake access controls and managed services instead of a separately operated model stack.
  • Serverless & Instant: No clusters to provision, scale, or manage. The models are simply available as SQL functions.
  • Role-Based Access Control (RBAC): All AI functions inherit your existing Snowflake security, governance, and masking policies.
  • Ease of Use: If you can write a SELECT statement, you can build Generative AI applications.

Supported Serverless LLMs​

Snowflake Cortex provides access to a variety of foundation models. You can choose the model that best fits your latency, cost, and accuracy requirements.

Available model families include Snowflake, Anthropic, Meta, Mistral AI, OpenAI, Google, and DeepSeek offerings. Availability, lifecycle status, pricing, and regional support change over time.

Note: Always verify the current supported-model and regional-availability documentation before selecting a production model.


Security & Privacy Boundaries​

One of the most critical aspects of Generative AI in the enterprise is data privacy. When using Snowflake Cortex:

  1. Managed Models: Models are hosted within the Snowflake service perimeter.
  2. Access Control: AI function and model access can be managed using account privileges, database roles, allowlists, and model RBAC.
  3. Regional Control: Regional availability and cross-region inference settings must be reviewed for regulated workloads.

️ The Two Categories of Cortex Functions​

Cortex functions are divided into two main categories:

1. Task-Specific LLM Functions​

These are pre-built, optimized functions designed to perform specific, common NLP tasks out-of-the-box without requiring prompt engineering.

  • AI_SENTIMENT: Scores the sentiment of text.
  • SNOWFLAKE.CORTEX.SUMMARIZE: Summarizes long text.
  • AI_TRANSLATE: Translates text between supported languages.
  • AI_CLASSIFY: Classifies text or images into supplied categories.

2. General Purpose LLM Functions​

These functions give you raw access to the foundation models for advanced, open-ended tasks and chat applications.

  • AI_COMPLETE: Sends a prompt to a selected model and can return text or a structured response.

Cost Considerations​

Unlike Virtual Warehouses, which are billed by compute time, Cortex AI Functions use AI Credit pricing based primarily on token or page consumption.

  • Tokens are pieces of words (roughly 1 token = 3/4 of an English word).
  • You are billed for both the Input Tokens (your prompt and the data you send) and the Output Tokens (the text the model generates).
  • Larger, more powerful models (like Llama 3 70B) cost more credits per 1M tokens than smaller models (like Llama 3 8B).

Best Practice: Always select the smallest model that is capable of completing your task successfully to optimize costs.

In the next module, we will dive right into using the Task-Specific LLM functions to perform analytics directly in SQL!