This bank is for engineers preparing for Snowflake's Generative AI specialty. Questions follow Cortex-era production work: LLM functions, Cortex Search, Cortex Analyst, embeddings, RAG patterns, Document AI, and the security controls you need before an agent can run SQL in a real account.
You will see items on credit consumption for Cortex functions, why larger models are not automatically better in production, retrieval quality vs generation quality, masking and RBAC around AI objects, and how Search / Analyst differ from a raw COMPLETE call.
Study companions: certification hub, Snowflake tutorials, and Cortex-related articles in the library. Launch the interactive quiz on this page for timed practice and per-topic scoring.
Not affiliated with Snowflake Inc. Always verify the live exam blueprint on Snowflake's certification site.
The items below are from this bank so a reader (and an ads crawler) can study real stems without running JavaScript. The interactive quiz on this page has the full set, timed exam mode, and per-topic scoring.
Why: `AI_COMPLETE()` (aliased as `SNOWFLAKE.CORTEX.COMPLETE()`) is the function for LLM text completion in Snowflake Cortex. It accepts a model name (e.g., `'llama3.1-70b'`, `'mistral-large2'`, `'claude-3-5-sonnet'`) and a prompt string. It returns the model's generated response as a string.
Why: Cortex Search is a hybrid retrieval service combining vector similarity (dense embeddings) and lexical/keyword search (BM25-style). This hybrid approach delivers higher recall than pure vector search (which can miss exact terms) or pure keyword search (which misses semantic matches). Snowflake handles embedding generation, indexing, and ranking automatically.
Why: Cortex Analyst requires a semantic model — either a YAML file uploaded to a stage or a native semantic view. The model describes base tables, dimensions, measures, synonyms, and verified queries. This structure is what allows the LLM to map business questions to accurate, governed SQL. Without it, accuracy drops significantly.
Why: `AI_CLASSIFY` is purpose-built for multi-class classification. It's cheaper and more consistent than AI_COMPLETE with a hand-rolled prompt because it's optimized/constrained to return one of the provided labels. AI_COMPLETE works but costs more credits and requires prompt engineering + parsing. Use AI_CLASSIFY whenever the label space is known and finite.
Why: Chunk size is a quality trade-off. Small chunks (e.g., 256 tokens) risk losing surrounding context needed for accurate answers. Large chunks (e.g., 2000+ tokens) reduce retrieval precision (many irrelevant tokens per hit) and can exceed LLM context windows. Typical starting point: 500-1000 tokens with 10-20% overlap. Always evaluate with a ground-truth set.
Why: `AI_PARSE_DOCUMENT` is the OCR/document-intelligence function in Cortex. It reads files from a stage (PDF, DOCX, PPTX, images) and returns structured text — commonly used as the first step of a RAG pipeline. `AI_EXTRACT` pulls structured fields from unstructured text (often used *after* AI_PARSE_DOCUMENT).
Why: Cortex AI functions bill on a token basis (input + output tokens), converted to Snowflake credits at rates published in the Cortex Consumption Table. Rates vary by model — smaller models (e.g., `llama3.1-8b`) are much cheaper than frontier models (e.g., `claude-3-5-sonnet`). Use `SNOWFLAKE.ACCOUNT_USAGE.CORTEX_FUNCTIONS_USAGE_HISTORY` to track spend.
Why: Always exhaust prompt engineering (few-shot examples, clearer instructions, structured output schemas) and model selection before fine-tuning. Fine-tuning is expensive, creates ongoing maintenance burden (retraining, evaluation), and often yields marginal gains over good prompting + a larger base model. Fine-tune only when (a) prompting plateaus, (b) you have quality labeled data, and (c) latency or cost of a larger model is unacceptable.
This preview is 8 of 100 questions. Use the quiz UI on this page to attempt the rest.
← Back to Home