Cortex AI functions (COMPLETE, SUMMARIZE, TRANSLATE, SENTIMENT, AI_FILTER, AI_CLASSIFY) run directly in SQL with 7+ LLM models and automatic optimization for filtering queries
Native App development with Streamlit, external access integrations, shared data patterns, and Marketplace publishing with security review workflow
JWT key-pair authentication with account locator/organization-
Confirm successful installation by checking the skill directory location:
.cursor/skills/snowflake-platform
Restart Cursor to activate snowflake-platform. Access via /snowflake-platform in your agent's command palette.
β
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Building Streamlit apps (use streamlit-snowflake skill)
Need data engineering/ETL patterns
Working with BI tools (Tableau, Looker)
Cortex AI Functions
Snowflake Cortex provides LLM capabilities directly in SQL. Functions are in the SNOWFLAKE.CORTEX schema.
Core Functions
Function
Purpose
GA Status
COMPLETE / AI_COMPLETE
Text generation from prompt
GA Nov 2025
SUMMARIZE / AI_SUMMARIZE
Summarize text
GA
TRANSLATE / AI_TRANSLATE
Translate between languages
GA Sep 2025
SENTIMENT / AI_SENTIMENT
Sentiment analysis
GA Jul 2025
AI_FILTER
Natural language filtering
GA Nov 2025
AI_CLASSIFY
Categorize text/images
GA Nov 2025
AI_AGG
Aggregate insights across rows
GA Nov 2025
COMPLETE Function
-- Simple promptSELECT SNOWFLAKE.CORTEX.COMPLETE('llama3.1-70b','Explain quantum computing in one sentence')AS response;-- With conversation historySELECT SNOWFLAKE.CORTEX.COMPLETE('llama3.1-70b',[ {'role': 'system','content': 'You are a helpful assistant'}, {'role': 'user','content': 'What is Snowflake?'}
])AS response;-- With optionsSELECT SNOWFLAKE.CORTEX.COMPLETE('mistral-large2','Summarize this document', {'temperature': 0.3,'max_tokens': 500}
)AS response;
Available Models:
llama3.1-70b, llama3.1-8b, llama3.2-3b
mistral-large2, mistral-7b
snowflake-arctic
gemma-7b
claude-3-5-sonnet (200K context)
Model Context Windows (Updated 2025):
Model
Context Window
Best For
Claude 3.5 Sonnet
200,000 tokens
Large documents, long conversations
Llama3.1-70b
128,000 tokens
Complex reasoning, medium documents
Llama3.1-8b
8,000 tokens
Simple tasks, short text
Llama3.2-3b
8,000 tokens
Fast inference, minimal text
Mistral-large2
Variable
Check current docs
Snowflake Arctic
Variable
Check current docs
Token Math: ~4 characters = 1 token. A 32,000 character document β 8,000 tokens.
Error: Input exceeds context window limit β Use smaller model or chunk your input.
SUMMARIZE Function
-- Single textSELECT SNOWFLAKE.CORTEX.SUMMARIZE(article_text)AS summary
FROM articles
LIMIT10;-- Aggregate across rows (no context window limit)SELECT AI_SUMMARIZE_AGG(review_text)AS all_reviews_summary
FROM product_reviews
WHERE product_id =123;
TRANSLATE Function
-- Translate to English (auto-detect source)SELECT SNOWFLAKE.CORTEX.TRANSLATE( review_text,'',-- Empty = auto-detect source language'en'-- Target language)AS translated
FROM international_reviews;-- Explicit source languageSELECT AI_TRANSLATE( description,'es',-- Source: Spanish'en'-- Target: English)AS translated
FROM spanish_products;
AI_FILTER (Natural Language Filtering)
Performance: As of September 2025, AI_FILTER includes automatic optimization delivering 2-10x speedup and up to 60% token reduction for suitable queries.
-- Filter with plain EnglishSELECT*FROM customer_feedback
WHERE AI_FILTER( feedback_text,'mentions shipping problems or delivery delays');-- Combine with SQL predicates for maximum optimization-- Query planner applies standard filters FIRST, then AI on smaller datasetSELECT*FROM support_tickets
WHERE created_date >'2025-01-01'-- Standard filter applied firstAND AI_FILTER(description,'customer is angry or frustrated');
Best Practice: Always combine AI_FILTER with traditional SQL predicates (date ranges, categories, etc.) to reduce the dataset before AI processing. This maximizes the automatic optimization benefits.
Throttling: During peak usage, AI function requests may be throttled with retry-able errors. Implement exponential backoff for production applications (see Known Issue #10).
AI_CLASSIFY
-- Categorize support ticketsSELECT ticket_id, AI_CLASSIFY( description,['billing','technical','shipping','other'])AS category
FROM support_tickets;
Billing
Cortex AI functions bill based on tokens:
~4 characters = 1 token
Both input AND output tokens are billed
Rates vary by model (larger models cost more)
Cost Management at Scale (Community-sourced):
Real-world production case study showed a single AI_COMPLETE query processing 1.18 billion records cost nearly $5K in credits. Cost drivers to watch:
Cross-region inference: Models not available in your region incur additional data transfer costs
Warehouse idle time: Unused compute still bills, but aggressive auto-suspend adds resume overhead
Large table joins: Complex queries with AI functions multiply costs
-- This seemingly simple query can be expensive at scaleSELECT product_id, AI_COMPLETE('mistral-large2','Summarize: '|| review_text)as summary
FROM product_reviews -- 1 billion rowsWHERE created_date >'2024-01-01';-- Cost = (input tokens + output tokens) Γ row count Γ model rate-- At scale, this adds up fast
Best Practices:
Filter datasets BEFORE applying AI functions
Right-size warehouses (don't over-provision)
Monitor credit consumption with QUERY_HISTORY views
Consider batch processing instead of row-by-row AI operations
βΊAccess to product documentation and roadmap tools (Jira, Notion, etc.)
βΊUnderstanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
βΊStakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Steps
1Install product management skill
2Start with user story generation for known feature
3Progress to competitive analysis: research 2-3 competitors
4Use for roadmap prioritization: apply RICE/ICE scoring
5Draft stakeholder communications and refine based on feedback
6Build template library for recurring PM tasks
7Share effective prompts with product team
Common Pitfalls
β Not validating competitive researchβverify facts before sharing
β Accepting user stories without involving engineering team
β Over-relying on frameworks without qualitative judgment
β Not customizing outputs to company culture and communication style
β Skipping stakeholder validation of generated requirements
Best Practices
β Do
+Validate research and competitive analysis with real data
+Collaborate with engineering when generating technical requirements
+Customize frameworks and templates to your company context
+Use skill for first drafts, refine with stakeholder input
+Document successful prompt patterns for PM tasks
+Combine AI efficiency with human judgment and intuition
β Don't
βDon't publish competitive analysis without fact-checking
βDon't finalize user stories without engineering review
βDon't make prioritization decisions solely on AI scoring
βDon't skip customer validation of generated requirements
βDon't ignore company-specific context and culture
π‘ Pro Tips
β Provide context: company goals, constraints, customer feedback
β Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
β Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
β Use skill for 70% generation + 30% customization to company needs
When to Use This
β Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
β Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path
1Basic: user stories, feature specs, status updates