Overview
Snowflake Cortex is a fully managed service within the Snowflake Data Cloud designed to facilitate the development and deployment of artificial intelligence (AI) and machine learning (ML) capabilities. It provides access to a suite of pre-trained large language models (LLMs) and ML models as SQL functions, allowing data professionals and developers to integrate generative AI and predictive analytics directly into their data pipelines and applications without moving data out of Snowflake (Snowflake Cortex documentation). This approach aims to reduce the complexity associated with managing separate AI infrastructure and data movement, enabling users to leverage AI capabilities on their existing data stored in Snowflake.
The platform is designed for a range of use cases, including building generative AI applications using LLM functions, embedding AI into existing data workflows for tasks like sentiment analysis or summarization, enabling natural language interaction with data for business intelligence, and accelerating the development of custom machine learning models. By offering AI capabilities through SQL and Python, Snowflake Cortex is positioned to serve a broad audience, from data analysts looking to enhance their queries with AI to data scientists building more complex models.
Snowflake Cortex supports various core products, including Cortex LLM Functions, which provide access to models like Llama 2 and Mistral for tasks such as text generation, summarization, and translation. Cortex Analyst and Cortex Search offer capabilities for natural language querying and intelligent search over structured and unstructured data, respectively. Cortex Text2SQL helps convert natural language questions into SQL queries, while Cortex ML Functions provide pre-built models for common machine learning tasks like forecasting and anomaly detection. These functionalities are integrated into the Snowflake environment, allowing for consistent governance and security across data and AI workloads.
The developer experience with Snowflake Cortex is centered on its integration within the Snowflake environment. Developers can use standard SQL functions or Python to interact with the underlying LLMs and ML models. This direct integration is intended to simplify the process of incorporating AI into data applications, as it eliminates the need for external tools or complex API integrations for data transfer. For example, a developer can call an LLM function directly within a SQL query to summarize a text column or generate new content based on data stored in a table.
While platforms like Databricks Lakehouse AI also offer integrated AI and data capabilities, Snowflake Cortex focuses on leveraging the existing Snowflake data cloud architecture for AI workloads (Databricks Lakehouse AI). This includes utilizing Snowflake's virtual warehouses for compute and its secure data sharing capabilities for AI-powered applications. The platform emphasizes a unified approach where data governance, security, and compliance policies applied to data also extend to AI models and their outputs.
Key features
- Cortex LLM Functions: Provides access to various large language models (LLMs) such as Llama 2 and Mistral via SQL and Python functions for tasks like text generation, summarization, translation, and sentiment analysis (Cortex LLM API reference).
- Cortex Analyst: Enables natural language interaction with data, allowing users to ask questions in plain English and receive insights from their Snowflake data.
- Cortex Search: Facilitates intelligent search capabilities over structured and unstructured data within Snowflake, leveraging AI to improve relevance and discovery.
- Cortex Text2SQL: Converts natural language questions into executable SQL queries, simplifying data exploration for non-technical users.
- Cortex ML Functions: Offers pre-built machine learning models as SQL functions for common tasks such as forecasting, anomaly detection, and classification, allowing for direct application to data within Snowflake.
- Seamless Data Integration: Operates directly on data stored within the Snowflake Data Cloud, eliminating the need for data movement to external AI services.
- SQL and Python Interface: Supports both SQL functions and Python for interacting with LLMs and ML models, catering to different developer preferences and use cases.
- Integrated Governance and Security: Extends Snowflake's existing security, privacy, and governance framework to AI workloads and models.
Pricing
Snowflake Cortex operates on a usage-based pricing model, consistent with the broader Snowflake Data Cloud. Costs are primarily incurred based on the compute resources consumed by queries and AI functions, as well as storage for data. Specific pricing details are available on the official Snowflake pricing guide.
| Service Component | Billing Metric | Notes |
|---|---|---|
| Compute (Virtual Warehouses) | Per second usage | Billed for the time virtual warehouses are active, processing queries and AI functions. |
| Storage | Per TB per month | Billed for data stored in Snowflake, including data used by Cortex. |
| Cortex LLM Functions | Usage-based (e.g., tokens processed, model calls) | Specific billing for LLM interactions may vary by model and usage volume. |
Pricing as of June 2026. For detailed and up-to-date pricing information, please refer to the Snowflake Pricing Guide.
Common integrations
- Snowflake Data Cloud: Cortex is natively integrated with the entire Snowflake platform, including Snowpipe for data ingestion, Snowsight for data exploration, and external functions for connecting to external services (Snowflake documentation).
- Streamlit: Developers can build data applications with Streamlit within Snowflake, using Cortex to power AI-driven features in their apps (Streamlit in Snowflake).
- Python Worksheets and Notebooks: Cortex functions can be called directly from Python worksheets and notebooks within Snowflake for data science and ML workflows.
- External APIs: While Cortex provides internal LLM functions, it can also be used in conjunction with external APIs through Snowflake's external functions capability to access other specialized AI services.
Alternatives
- Databricks Lakehouse AI: Offers an integrated platform for data, analytics, and AI, including tools for ML model development and deployment.
- Google Cloud Vertex AI: A managed machine learning platform for building, deploying, and scaling ML models, including access to Google's foundational models.
- Amazon SageMaker: A cloud-based machine learning service that helps developers build, train, and deploy ML models.
- OpenAI API: Provides access to OpenAI's language models (e.g., GPT-4) via an API for integration into various applications.
- H2O.ai: Offers open-source and commercial AI platforms for automated machine learning and generative AI applications.
Getting started
To begin using Snowflake Cortex, you can leverage its LLM functions directly within SQL. The following example demonstrates how to use the COMPLETE_FLAT function to interact with a large language model to summarize a piece of text.
-- Enable Cortex functions for your account if not already enabled
-- This step might require ACCOUNTADMIN role or specific privileges.
-- ALTER ACCOUNT SET CORTEX_SERVICE_ENABLED = TRUE;
-- Example: Summarize a text using a Cortex LLM function
SELECT
SNOWFLAKE.CORTEX.COMPLETE_FLAT(
'llama2-70b-chat',
'Summarize the following article in two sentences: "Artificial intelligence (AI) is intelligence—perceiving, synthesizing, and inferring information—demonstrated by machines, as opposed to intelligence displayed by animals or humans. Leading AI textbooks define the field as the study of "intelligent agents": any device that perceives its environment and takes actions that maximize its chance of successfully achieving its goals."'
) AS summary_output;
-- Example: Translate text from English to French
SELECT
SNOWFLAKE.CORTEX.COMPLETE_FLAT(
'llama2-70b-chat',
'Translate the following English text to French: "Hello, how are you today?"'
) AS translated_text;
-- Example: Extract keywords from a product review
SELECT
SNOWFLAKE.CORTEX.COMPLETE_FLAT(
'mistral-7b-instruct',
'Extract keywords from this product review: "This laptop has excellent battery life and a vibrant display, but the keyboard feels a bit flimsy."'
) AS keywords;
For more detailed examples and to explore other Cortex functions, refer to the Snowflake Cortex Developer Guide.