AI Model Wiki

    Skip to main content
    17 min
    Lesson 3 of 4

    Production Deployment & Governance

    From the course Snowflake Cortex AI

    Deploying Cortex AI in production requires attention to performance, cost management, and governance.

    Performance Optimization

    Compute Sizing

    • LLM functions use serverless compute (no warehouse needed for basic functions)
    • Complex pipelines benefit from dedicated AI warehouses
    • Batch processing is more efficient than row-by-row
    • Use appropriate model sizes: smaller models for simple tasks

    Model Selection Guide

    TaskRecommended ModelSpeedQuality
    Sentiment analysisBuilt-in functionFastestHigh
    Text classificationmistral-7bFastGood
    Summarizationmistral-largeMediumHigh
    Complex reasoningllama3-70bSlowerHighest

    Caching

    • Cache AI results in tables for repeated queries
    • Use materialized views for frequently accessed enrichments
    • Incremental processing: only run AI on new/changed records

    Cost Management

    • LLM functions are priced per token processed
    • Monitor usage with Snowflake's cost management tools
    • Set resource monitors and alerts
    • Use smaller models when quality is sufficient
    • Batch process during off-peak hours for lower costs

    Governance & Security

    Access Control

    • Cortex functions respect Snowflake's RBAC
    • Control who can call LLM functions with role grants
    • Audit AI usage through query history
    • Mask sensitive data before AI processing

    Data Governance

    • AI outputs inherit the governance of input data
    • Tag AI-generated columns for lineage tracking
    • Document which models were used for compliance
    • Implement data quality checks on AI outputs

    Streamlit Integration

    Build interactive AI apps with Streamlit in Snowflake:

    • Create chat interfaces powered by Cortex
    • Build dashboards with AI-generated insights
    • Deploy internal tools with semantic search
    • No external hosting required — runs inside Snowflake

    Key Takeaways

    • •Select model sizes based on task complexity — smaller models for simple tasks
    • •Cache AI results and process incrementally to manage costs effectively
    • •Cortex functions respect Snowflake RBAC and audit controls
    • •Streamlit in Snowflake enables interactive AI applications without external hosting
    0 of 4 lessons marked complete

    Progress is kept in this browser only.