AdvancedLast updated: 2026-04-09 • 3 sections
Expert questions on Cortex LLM functions, ML functions, embeddings, fine-tuning, and AI apps in Snowflake.
Q: What are Cortex LLM functions and how do they differ from external APIs?
Cortex functions (COMPLETE, SUMMARIZE, TRANSLATE, SENTIMENT) run Llama/Mistral inside Snowflake. Data never leaves, called via SQL, billed per-token as credits, governed by RBAC, GPU scaling managed by Snowflake. Trade-off: no GPT-4. Governance outweighs model variety for enterprises.
Q: How do you control temperature, tokens, system prompts?
Simple: COMPLETE(model, prompt). Advanced: pass options with messages array, temperature (0=deterministic), max_tokens, top_p. Batch: SELECT COMPLETE(model, text_col) FROM table processes every row. Caution with large tables.
Q: How to build RAG entirely in Snowflake?
Embed docs with EMBED_TEXT_768, store in VECTOR column, retrieve top-K via VECTOR_COSINE_SIMILARITY, generate with COMPLETE. No external vector DB. For production, use Cortex Search Service which handles chunking, embedding, indexing automatically.
Q: What embedding models are available?
e5-base-v2 (general), multilingual-e5-large (100+ languages), snowflake-arctic-embed (best retrieval). Choose by language, quality/cost, storage. Store in VECTOR(FLOAT, 768).
Q: How is Cortex AI billed?
Per-token, varies by model. Controls: smallest model, limit max_tokens, pre-filter data, cache results, resource monitors, test on LIMIT 100 first. Monitor via METERING_DAILY_HISTORY.
Q: ML-powered functions vs LLMs?
FORECAST, ANOMALY_DETECTION, CLASSIFICATION, TOP_INSIGHTS trained on your data. Structured prediction, much cheaper (classical ML), auto feature engineering. Use ML for forecasting/fraud; LLMs for text.
Q: When fine-tune vs prompt engineer?
Fine-tune: consistent format (JSON schema), domain terms, inconsistent prompts. Need 100+ examples. Skip for general QA (use RAG instead) or simple classification.
Not available. Cortex hosts Llama, Mistral, Arctic. For GPT-4/Claude, use external functions but data leaves Snowflake.
Enterprise+ required. Availability varies by region. Check SHOW CORTEX MODELS in your account.