Flashcards - SnowPro Gen AI C02
30 cards across the four domains. Format is Q: ... | A: ... — one per line, pipe-delimited for easy Anki import (set field separator to |).
Domain 1 - Gen AI principles & best practices
Q: Which database role must be granted to call any Snowflake Cortex AI function? | A: SNOWFLAKE.CORTEX_USER
Q: What account-level parameter restricts which LLMs a Snowflake account can call via Cortex? | A: CORTEX_MODELS_ALLOWLIST
Q: When is cross-region inference invoked, and what is the governance implication? | A: When the requested model is not hosted in the account's local region. Data crosses regions, which may violate data residency policies.
Q: Which Snowflake-integrated tool is recommended for LLM evaluation and observability? | A: TruLens (via Snowflake AI Observability)
Q: Where do you query Cortex function usage and credit consumption? | A: SNOWFLAKE.ACCOUNT_USAGE.CORTEX_FUNCTIONS_QUERY_HISTORY
Domain 2 - Cortex AI features & LLM functions
Q: What is the recommended modern function for text completion, and what is its legacy equivalent? | A: Modern: AI_COMPLETE. Legacy: SNOWFLAKE.CORTEX.COMPLETE.
Q: Which two Cortex AI functions bypass the LLM context window limit by aggregating across rows? | A: AI_AGG (custom prompt) and AI_SUMMARIZE_AGG (purpose-built summary).
Q: What are the dimensions of EMBED_TEXT_768 and EMBED_TEXT_1024 outputs? | A: 768 and 1024 dimensions respectively. Mismatch breaks downstream similarity calculations.
Q: Which embedding models are available for snowflake-arctic-embed-l-v2.0, and what's the difference between the default and the -8k variant? | A: snowflake-arctic-embed-l-v2.0 has a 512-token window; the -8k variant supports 8192 tokens. Both are 1024-dim multilingual.
Q: What three retrieval mechanisms does Cortex Search combine? | A: Vector search, BM25-style keyword search, and semantic reranking.
Q: What clause in CREATE CORTEX SEARCH SERVICE defines columns available for query-time filtering? | A: ATTRIBUTES
Q: What's the refresh behavior when a Cortex Search Service has a PRIMARY KEY vs no PRIMARY KEY? | A: With PRIMARY KEY: incremental refresh (only changed rows). Without: full reindex on every refresh.
Q: What's the purpose of Cortex Analyst, and what artifact does it depend on? | A: Natural-language-to-SQL over structured data. Depends on a semantic model YAML defining logical tables, dimensions, facts, metrics, relationships.
Q: Cortex Analyst vs Cortex Search — which for which use case? | A: Analyst for text-to-SQL over structured BI data. Search for retrieval over unstructured documents (RAG).
Q: What SQL syntax submits a fine-tuning job in Cortex? | A: SELECT SNOWFLAKE.CORTEX.FINETUNE('CREATE', 'model_name', 'base_model', 'SELECT prompt, completion FROM training_table');
Q: What does TRY_COMPLETE return on failure, vs COMPLETE? | A: TRY_COMPLETE returns NULL. COMPLETE raises an error.
Q: When would you use EXTRACT_ANSWER vs AI_COMPLETE for a question-answering task? | A: EXTRACT_ANSWER is extractive — only returns spans found in the source text, no generative fallback. AI_COMPLETE is generative and can hallucinate. Use EXTRACT_ANSWER when grounding to the source is required.
Domain 3 - SPCS + Model Registry
Q: What's the difference between deploying a model to a warehouse vs SPCS in Snowflake Model Registry? | A: Warehouse: CPU inference, SQL/Python callable, lower cost. SPCS: GPU-backed REST endpoint, required for large open-source LLMs and custom runtimes.
Q: What Python class is used to create or access the Model Registry? | A: snowflake.ml.registry.Registry
Q: Once a model is logged, how do you call its predict method from SQL? | A: SELECT my_db.my_schema.MODEL_NAME!PREDICT(*) FROM input_table; — the ! syntax invokes a model version method.
Q: What's the purpose of a model alias in Model Registry? | A: Pointer to a specific version (e.g., 'production', 'default') that can be atomically swapped without changing application code.
Q: List four supported model types in Snowflake Model Registry. | A: scikit-learn, XGBoost, LightGBM, PyTorch, TensorFlow/Keras, Hugging Face pipelines, Prophet, MLflow pyfunc, CatBoost, custom Python (any four).
Q: What's a partitioned model in Model Registry, and when do you use one? | A: A model that runs separately per partition column value (e.g., per-customer, per-region). Use for per-tenant models with parallel batch inference.
Q: What's the YAML artifact that defines a Snowpark Container Service? | A: Service spec (or "specification") YAML — declares containers, endpoints, resources, volumes, env vars.
Q: What resource type in an SPCS service spec requests GPU? | A: nvidia.com/gpu (under containers[].resources.requests and limits)
Q: Why might an SPCS compute pool incur cost even when no service is running on it? | A: Compute pools remain active (and billed) by default. Configure AUTO_SUSPEND to suspend idle pools.
Domain 4 - Document processing
Q: What are the two modes of PARSE_DOCUMENT, and what's the output difference? | A: OCR (default): plain text only. LAYOUT: text + structural content including tables and reading order.
Q: What's the modern replacement for SNOWFLAKE.CORTEX.PARSE_DOCUMENT, and when does the legacy version deprecate? | A: AI_PARSE_DOCUMENT replaces it. Legacy PARSE_DOCUMENT is deprecated by end of 2026.
Q: What document formats does PARSE_DOCUMENT support? | A: PDF, PowerPoint (.pptx), Word (.docx), images (PNG/JPG/TIFF).
Q: What's the difference between PARSE_DOCUMENT and AI_EXTRACT? | A: PARSE_DOCUMENT: file in stage → raw text + layout. AI_EXTRACT: text/image/file + schema → structured object matching the schema. Typically chain them: PARSE_DOCUMENT first, AI_EXTRACT second when you need typed fields.
Q: What stage property must be set to use the DIRECTORY() table function on a stage? | A: DIRECTORY = (ENABLE = TRUE), and you must run ALTER STAGE ... REFRESH after PUT operations to update the listing.
Optional: extra cards for the truly paranoid
Q: What's the default embedding model for a Cortex Search Service if EMBEDDING_MODEL is omitted, and is it multilingual? | A: snowflake-arctic-embed-m-v1.5 (768 dims). English-only.
Q: What's the legacy function that gives entity-level sentiment vs document-level sentiment? | A: ENTITY_SENTIMENT (entity-level) vs SENTIMENT (document-level, -1 to 1 scale).
Q: For audio/video transcription in Cortex, which function and what does it return? | A: AI_TRANSCRIBE. Returns text with timestamps and speaker information.
Q: For PII removal, which Cortex function? | A: AI_REDACT.
Anki import instructions
- Save this file's Q/A lines as plain text
- In Anki: File → Import → set field separator to
|, allow HTML disabled - Map field 1 = Front, field 2 = Back
- Tag deck
snowpro-genai-c02