CertSafari

    Free Snowflake SnowPro Specialty: Gen AI (GES-C01) Sample Questions

    35 free sample questions from our bank of 329+, covering every exam domain, with answers and detailed explanations. Updated August 2026.

    Domain 1: Snowflake for Gen AI Overview

    1.1 Define Snowflake’s Gen AI principles, features, and best practices.

    1.Which of the following are core principles of Snowflake's security and privacy model for Gen AI features like Cortex LLM Functions?(Select 2)

    1. A.All customer data is used to train Snowflake's foundational models by default.
    2. B.Data processing for Cortex LLM functions occurs within the Snowflake trust boundary.
    3. C.All Gen AI features are managed by a separate access control framework outside of Snowflake RBAC.
    4. D.Role-Based Access Control (RBAC) is used to govern access to all Gen AI features and functions.
    5. E.Access to external models is enabled by default for all accounts.
    Show answer & explanation

    Correct answers: B, DData processing for Cortex LLM functions occurs within the Snowflake trust boundary.; Role-Based Access Control (RBAC) is used to govern access to all Gen AI features and functions.

    • A. Incorrect. This statement directly contradicts Snowflake's core privacy principles. Snowflake explicitly states that customer data is not used to train its general-purpose, foundational models. Interactions with Cortex functions are ephemeral and do not contribute to model training, ensuring customer data remains private.
    • B. Correct. This is a fundamental principle of Snowflake Cortex. By executing LLM functions within the same security perimeter as the data itself, Snowflake ensures that sensitive data does not need to be moved to an external service. This maintains the integrity of the Snowflake trust boundary and is a key security and governance benefit.
    • C. Incorrect. Snowflake's architecture is built on a unified governance model. Gen AI features are integrated as first-class objects within the platform and are governed by the same Role-Based Access Control (RBAC) framework used for all other Snowflake objects, ensuring consistent and simplified security administration.
    • D. Correct. Snowflake leverages its existing, robust RBAC model to manage permissions for all Gen AI features. To use a Cortex LLM function, a role must be explicitly granted the necessary USAGE privilege on the function or the schema containing it. This provides granular and consistent control over who can access and utilize these powerful capabilities.
    • E. Incorrect. Following the principle of 'secure by default', access to external models is not enabled for accounts. An administrator must explicitly create and configure External Access Integrations and Network Rules, and then grant specific privileges to roles to allow communication with external endpoints.

    1.1 Define Snowflake’s Gen AI principles, features, and best practices.

    2.A developer is building a Retrieval-Augmented Generation (RAG) application using only Snowflake-native features. The first step involves finding the most relevant context from a document knowledge base. The second step is to use that context to answer a user's question. Which two functions, used in sequence, accomplish this?

    1. A.1. `CORTEX_SEARCH` 2. `SUMMARIZE`
    2. B.1. `VECTOR_L2_DISTANCE` 2. `COMPLETE`
    3. C.1. `EXTRACT_ANSWER` 2. `COMPLETE`
    4. D.1. `CORTEX_SEARCH` 2. `COMPLETE`
    Show answer & explanation

    Correct answer: D1. `CORTEX_SEARCH` 2. `COMPLETE`

    • A. Incorrect. While `CORTEX_SEARCH` correctly performs the retrieval step, the `SUMMARIZE` function is designed to condense a piece of text. It does not perform the 'generation' part of RAG, which involves synthesizing an answer to a specific question based on the retrieved context.
    • B. Incorrect. This sequence represents a valid pattern for a more manual RAG implementation. However, `VECTOR_L2_DISTANCE` is a low-level mathematical function used to calculate the distance between vectors. It is only one component of the retrieval step, which also requires creating embeddings and structuring a query to order by distance. `CORTEX_SEARCH` is a higher-level, dedicated function that encapsulates the entire retrieval process.
    • C. Incorrect. This sequence is illogical for a RAG pattern. `EXTRACT_ANSWER` is used to find a direct answer within a given document, which would happen *after* retrieval, not as the retrieval step itself. The correct first step is to find the relevant documents, which is not represented here.
    • D. Correct. This sequence perfectly aligns with the two primary stages of a RAG application using Snowflake's high-level Cortex functions. The `CORTEX_SEARCH` service performs the 'Retrieval' step by finding the most relevant documents for a given query. The `COMPLETE` function then performs the 'Augmented Generation' step by using a Large Language Model (LLM) to synthesize a final answer based on the user's question and the context retrieved by `CORTEX_SEARCH`.

    1.1 Define Snowflake’s Gen AI principles, features, and best practices.

    3.Which Snowflake features are currently in Public Preview, as of the GES-C01 exam's scope?(Select 2)

    1. A.Cortex LLM Functions like `COMPLETE` and `SENTIMENT`
    2. B.Snowpark Container Services
    3. C.Cortex Agents
    4. D.Role-Based Access Control (RBAC)
    5. E.Cortex LLM Playground
    Show answer & explanation

    Correct answers: A, BCortex LLM Functions like `COMPLETE` and `SENTIMENT`; Snowpark Container Services

    • A. Correct. As of the GES-C01 exam's likely knowledge cutoff date, Snowflake Cortex LLM Functions were in Public Preview. These serverless functions, such as `COMPLETE`, `SENTIMENT`, and `SUMMARIZE`, integrate large language models directly into SQL, allowing users to perform generative AI tasks on their data without moving it outside of Snowflake.
    • B. Correct. Snowpark Container Services was in Public Preview for an extended period, which falls within the scope of the GES-C01 exam. This feature enables developers to deploy, run, and manage containerized applications and services directly within the Snowflake ecosystem, co-located with their data.
    • C. Incorrect. Snowflake Cortex Agents are a newer framework for building AI agents that can interact with data and perform tasks. Within the likely timeframe for the GES-C01 exam, this feature was in Private Preview, not Public Preview.
    • D. Incorrect. Role-Based Access Control (RBAC) is a foundational, core security feature of the Snowflake platform. It has been Generally Available (GA) for many years and is not a preview feature.
    • E. Incorrect. The Cortex LLM Playground is a user interface component within Snowsight that allows for interactive experimentation with Cortex LLM Functions. It is a tool for developers, not a standalone Snowflake feature with its own distinct preview status.

    1.2 Outline Gen AI capabilities in Snowflake.

    4.A data science team is building a product recommendation engine. They need to represent product descriptions from their `PRODUCTS` table as numerical vectors to calculate similarity scores. Which Cortex function should they use to generate these vector embeddings efficiently within Snowflake?

    1. A.SELECT SNOWFLAKE.CORTEX.COMPLETE('Llama-2-7b-chat', 'vectorize: ' || description) FROM products;
    2. B.SELECT SNOWFLAKE.CORTEX.VECTORIZE(description) FROM products;
    3. C.SELECT SNOWFLAKE.CORTEX.EMBED_TEXT_768('e5-base-v2', description) FROM products;
    4. D.SELECT SNOWFLAKE.CORTEX.ANALYZE_SIMILARITY(description) FROM products;
    Show answer & explanation

    Correct answer: CSELECT SNOWFLAKE.CORTEX.EMBED_TEXT_768('e5-base-v2', description) FROM products;

    • A. Incorrect. The `SNOWFLAKE.CORTEX.COMPLETE` function is used for generative text tasks, such as summarization or question answering, by sending a prompt to a large language model. It is not designed for generating vector embeddings.
    • B. Incorrect. `SNOWFLAKE.CORTEX.VECTORIZE` is not a valid function within the Snowflake Cortex feature set. This syntax is invalid for generating vector embeddings.
    • C. Correct. The `SNOWFLAKE.CORTEX.EMBED_TEXT_768` function is specifically designed to generate 768-dimensional vector embeddings from text input. It takes the embedding model name (e.g., 'e5-base-v2') and the text column as arguments, which is precisely what is needed to convert product descriptions into numerical vectors for similarity analysis.
    • D. Incorrect. There is no `ANALYZE_SIMILARITY` function in Snowflake Cortex. Similarity analysis is typically performed using functions like `VECTOR_COSINE_SIMILARITY` or `VECTOR_L2_DISTANCE` on vectors that have already been generated, but these functions do not create the embeddings themselves.

    1.2 Outline Gen AI capabilities in Snowflake.

    5.A data architect is creating a semantic model for Cortex Analyst. The model needs to define tables, columns, join relationships, and aggregations. The architect wants an approach that is code-based and can be managed in a Git repository for version control. Which method of defining the semantic model would be MOST suitable for this requirement?

    1. A.Using the Snowflake UI to visually define the relationships.
    2. B.Creating and managing a YAML file in a named stage.
    3. C.Writing comments directly into the table DDL.
    4. D.Using the `CREATE SEMANTIC MODEL` DDL and managing the SQL file in Git.
    Show answer & explanation

    Correct answer: DUsing the `CREATE SEMANTIC MODEL` DDL and managing the SQL file in Git.

    • A. Incorrect. Using the Snowflake UI is a visual, point-and-click method. It does not meet the core requirement for a code-based approach that can be version-controlled in a Git repository.
    • B. Incorrect. While defining a semantic model in a YAML file is a valid code-based approach, it is not the most suitable or direct method. It requires an additional step of uploading the file to a Snowflake stage before the `CREATE SEMANTIC MODEL ... FROM FILE` command can be executed.
    • C. Incorrect. Writing definitions in comments within table DDL is not a structured, supported, or parsable method for creating a semantic model. Cortex Analyst would not be able to interpret these comments.
    • D. Correct. Using the `CREATE SEMANTIC MODEL` DDL statement is a native, code-based Snowflake feature. This approach allows the entire model definition to be self-contained within a standard SQL file. This file can be easily managed, versioned, and audited in a Git repository, aligning perfectly with database-as-code and CI/CD best practices.

    1.2 Outline Gen AI capabilities in Snowflake.

    6.Which Snowflake feature is fundamentally leveraged by Cortex Search to provide relevant context from unstructured data for Retrieval-Augmented Generation (RAG) applications?

    1. A.Materialized Views
    2. B.Snowpark User-Defined Functions
    3. C.Vector search and text embedding models
    4. D.Dynamic Data Masking
    Show answer & explanation

    Correct answer: CVector search and text embedding models

    • A. Incorrect. Materialized Views are a performance optimization feature used to store pre-computed query results. They are not designed for handling unstructured data or for the semantic search and retrieval required by RAG applications.
    • B. Incorrect. While Snowpark User-Defined Functions (UDFs) allow for the execution of custom code and logic within Snowflake, they are not the core, underlying feature that powers Cortex Search for context retrieval from unstructured data. Cortex Search is a managed service that abstracts the underlying mechanics.
    • C. Correct. Cortex Search fundamentally relies on text embedding models to convert unstructured text into numerical vector representations. It then uses vector search capabilities to efficiently find and retrieve the most semantically relevant text chunks based on a user's query. This retrieved context is then used in RAG applications to augment prompts for Large Language Models.
    • D. Incorrect. Dynamic Data Masking is a data governance and security feature used to obfuscate sensitive data in columns based on user roles or policies. It is entirely unrelated to the functionality of retrieving context from unstructured data for Gen AI applications.

    Domain 2: Snowflake Gen AI & LLM Functions

    2.1 Apply Gen AI and LLM functions in Snowflake.

    7.What is the primary purpose of using Snowflake Cortex Fine-tuning?

    1. A.To train a large language model from scratch using a company's private data.
    2. B.To create a smaller, distilled version of a foundation model for faster inference.
    3. C.To adapt a pre-trained foundation model to perform better on specific tasks or to understand a specialized vocabulary by training it on a custom dataset.
    4. D.To select the best-performing pre-trained model for a given task from a list of available models.
    Show answer & explanation

    Correct answer: CTo adapt a pre-trained foundation model to perform better on specific tasks or to understand a specialized vocabulary by training it on a custom dataset.

    • A. Incorrect. Fine-tuning adapts an existing pre-trained model. It does not involve the massive computational effort and data required to train a large language model from the ground up.
    • B. Incorrect. This option describes model distillation, a technique for creating smaller, more efficient models. The primary goal of fine-tuning is specialization and performance improvement on specific tasks, not necessarily model size reduction.
    • C. Correct. This is the precise definition of fine-tuning. Snowflake Cortex Fine-tuning enables users to take a general-purpose foundation model and specialize it for their specific domain, vocabulary, or task by continuing its training on a curated, private dataset. This improves the model's accuracy and relevance for the target use case.
    • D. Incorrect. Fine-tuning is a process of adapting a single, chosen model to improve its performance. It is not a method for comparing or selecting among different available models, which is a separate evaluation step that would typically occur before deciding to fine-tune.

    2.1 Apply Gen AI and LLM functions in Snowflake.

    8.A compliance officer needs to verify a specific detail in a large set of contracts. For each contract stored in the `contracts_text` column, they need to answer the question: 'What is the governing law jurisdiction mentioned in this document?'. The answer is expected to be a short, direct quote from the text. Which function is most suitable for this task?

    1. A.SNOWFLAKE.CORTEX.SUMMARIZE
    2. B.SNOWFLAKE.CORTEX.COMPLETE
    3. C.SNOWFLAKE.CORTEX.EXTRACT_ANSWER
    4. D.SNOWFLAKE.CORTEX.CLASSIFY_TEXT
    Show answer & explanation

    Correct answer: CSNOWFLAKE.CORTEX.EXTRACT_ANSWER

    • A. Incorrect. The SNOWFLAKE.CORTEX.SUMMARIZE function is designed to generate a condensed summary of a longer text. It is not suitable for extracting specific, precise details or direct quotes in response to a question.
    • B. Incorrect. The SNOWFLAKE.CORTEX.COMPLETE function is a generative text model used to complete a given prompt or generate new text. It is not designed for information extraction from an existing document.
    • C. Correct. The SNOWFLAKE.CORTEX.EXTRACT_ANSWER function is specifically designed for this use case. It takes a document and a question as input and extracts the most relevant answer directly from the provided text, making it ideal for finding specific details like a governing law jurisdiction.
    • D. Incorrect. The SNOWFLAKE.CORTEX.CLASSIFY_TEXT function is used to categorize text content into predefined labels or classes. It does not extract specific answers or direct quotes from the text.

    2.1 Apply Gen AI and LLM functions in Snowflake.

    9.A global company collects product reviews in multiple languages. The marketing team wants to get a sentiment score (from -1 to 1) for every review, regardless of its original language. The final analysis must be based on the sentiment of the text in English. What is the correct sequence of operations in a single SQL query?

    1. A.SELECT SNOWFLAKE.CORTEX.TRANSLATE(SNOWFLAKE.CORTEX.SENTIMENT(review_text), 'en') FROM reviews;
    2. B.SELECT SNOWFLAKE.CORTEX.SENTIMENT(SNOWFLAKE.CORTEX.TRANSLATE(review_text, 'en')) FROM reviews;
    3. C.First run SENTIMENT, then run TRANSLATE on the results in a separate query.
    4. D.SELECT SNOWFLAKE.CORTEX.CLASSIFY_TEXT(review_text, ['positive', 'negative']) FROM reviews;
    Show answer & explanation

    Correct answer: BSELECT SNOWFLAKE.CORTEX.SENTIMENT(SNOWFLAKE.CORTEX.TRANSLATE(review_text, 'en')) FROM reviews;

    • A. Incorrect. This query attempts to run `SENTIMENT` on the original text first, which produces a numerical score. It then incorrectly tries to use the `TRANSLATE` function on this numeric score. The `TRANSLATE` function expects text as input, not a number, making this sequence of operations invalid.
    • B. Correct. This query nests the functions in the proper order to meet the requirement. The inner function, `SNOWFLAKE.CORTEX.TRANSLATE(review_text, 'en')`, executes first, converting the review into English. The output of the translation is then passed to the outer function, `SNOWFLAKE.CORTEX.SENTIMENT`, which correctly calculates the sentiment score based on the English text.
    • C. Incorrect. This option violates the requirement to perform the operation in a 'single SQL query'. Furthermore, it suggests the incorrect order of operations by performing sentiment analysis before translation, which would analyze the sentiment in the original language, not English as required.
    • D. Incorrect. This option uses the wrong function for the task. `SNOWFLAKE.CORTEX.CLASSIFY_TEXT` is used for classifying text into predefined categories. The requirement is to get a numerical 'sentiment score (from -1 to 1)', for which the `SNOWFLAKE.CORTEX.SENTIMENT` function is the appropriate choice.

    2.2 Perform data analysis given a use case.

    10.A financial services company wants to enable its business analysts to ask natural language questions about quarterly earnings data stored in a table named `FINANCIALS.REPORTS.EARNINGS`. The company has a strict policy that all calculations for 'net_profit_margin' must use a specific, pre-approved formula to ensure regulatory compliance. How can a data architect implement Cortex Analyst to meet this requirement?

    1. A.Create a Cortex Analyst instance and provide a `custom_instruction` that specifies the exact SQL formula for 'net_profit_margin'.
    2. B.Create a secure view named `V_EARNINGS_WITH_MARGIN` that includes the approved calculation, and register this view in the Verified Query Repository (VQR) for the Cortex Analyst instance to use.
    3. C.Fine-tune a Snowflake LLM with examples of the correct 'net_profit_margin' calculation and use it as the backend for Cortex Analyst.
    4. D.Grant the analyst role SELECT privileges on the `EARNINGS` table and rely on Cortex Analyst's default semantic understanding to correctly calculate the margin.
    Show answer & explanation

    Correct answer: BCreate a secure view named `V_EARNINGS_WITH_MARGIN` that includes the approved calculation, and register this view in the Verified Query Repository (VQR) for the Cortex Analyst instance to use.

    • A. Incorrect. While `custom_instruction` can guide Cortex Analyst's behavior and provide context, it does not strictly enforce the use of a specific formula. It acts as a hint to the LLM, which could still be misinterpreted or overridden, creating a risk of non-compliant calculations.
    • B. Correct. This is the recommended approach for enforcing business logic and governance. Creating a secure view encapsulates the approved, compliant calculation for 'net_profit_margin'. Registering this view in the Verified Query Repository (VQR) tells Cortex Analyst to treat it as a trusted, primary source, ensuring that any query about that metric will use the pre-defined, compliant formula from the view.
    • C. Incorrect. Fine-tuning a Snowflake LLM is a complex process designed to adapt a model's general behavior or knowledge base. It is not a reliable mechanism for enforcing a single, specific SQL formula in every relevant query. This approach does not guarantee compliance and is overly complex for this requirement.
    • D. Incorrect. Relying on Cortex Analyst's default semantic understanding is insufficient for regulatory compliance. The LLM's general interpretation of 'net_profit_margin' might not match the company's specific, pre-approved formula, leading to inaccurate and non-compliant results.

    2.2 Perform data analysis given a use case.

    11.What is the primary function of the Verified Query Repository (VQR) in the context of Cortex Analyst?

    1. A.To cache the results of frequently asked natural language questions.
    2. B.To store a history of all queries generated by Cortex Analyst for auditing purposes.
    3. C.To provide Cortex Analyst with a set of trusted, pre-vetted SQL queries, views, or functions to use for answering specific or complex questions.
    4. D.To suggest relevant questions to users based on their query history and role.
    Show answer & explanation

    Correct answer: CTo provide Cortex Analyst with a set of trusted, pre-vetted SQL queries, views, or functions to use for answering specific or complex questions.

    • A. Incorrect. The VQR is not a caching mechanism. Snowflake has a separate query result cache for storing the results of executed queries. The VQR's purpose is to provide trusted SQL logic, not to store query results.
    • B. Incorrect. While the VQR contains queries, its primary goal is not to serve as an audit log. Query history for auditing purposes is available through Snowflake's QUERY_HISTORY view and other monitoring features.
    • C. Correct. The Verified Query Repository's main purpose is to allow data experts to define and store a curated set of trusted SQL queries, views, or functions. Cortex Analyst can then use these pre-vetted assets to answer specific, complex, or ambiguous user questions, ensuring accuracy, consistency, and performance.
    • D. Incorrect. The VQR does not suggest questions to users. Its function is to provide reliable answers by using pre-defined SQL assets, not to generate new question prompts. Question suggestion would be a separate user interface or recommendation feature.

    2.2 Perform data analysis given a use case.

    12.An organization has fine-tuned a proprietary LLM for a specific task. They now want to use this model within Snowflake. How does the latency of a fine-tuned model, when used via Cortex AI functions, generally compare to using a standard, fully-managed Snowflake LLM of a similar size?

    1. A.Fine-tuned models always have lower latency because they are optimized for a specific task.
    2. B.Fine-tuned models may exhibit higher latency due to factors like 'cold starts' if the model is not actively in use, as it may need to be loaded into memory.
    3. C.Latency is identical because all models run on the same underlying GPU infrastructure.
    4. D.Latency for fine-tuned models is primarily dependent on the virtual warehouse size, unlike standard models.
    Show answer & explanation

    Correct answer: BFine-tuned models may exhibit higher latency due to factors like 'cold starts' if the model is not actively in use, as it may need to be loaded into memory.

    • A. Incorrect. Optimization for a specific task typically refers to improving the model's accuracy or relevance for that task, not its inference speed. Latency is a performance metric influenced more by deployment factors, such as how the model is hosted and accessed, rather than its task specialization.
    • B. Correct. Standard, fully-managed Snowflake LLMs are generally kept 'warm' due to constant usage across the platform. A custom fine-tuned model may be used less frequently. To manage resources efficiently, the service may unload the model from memory when it's idle. When a new request arrives, the model must be loaded back into memory, a process known as a 'cold start', which introduces significant initial latency.
    • C. Incorrect. Even if models run on similar GPU infrastructure, their management and deployment strategies can differ significantly. A standard, high-traffic model might be replicated and kept active on multiple servers, while a custom model might be loaded on-demand. These differing operational patterns lead to variations in latency.
    • D. Incorrect. Snowflake Cortex AI functions utilize Snowflake-managed compute resources that are separate from user-managed virtual warehouses. Therefore, the latency of a fine-tuned model is primarily influenced by the Cortex service's internal operations, like model loading (cold starts), and not directly by the size of the user's virtual warehouse.

    2.3 Build chat interfaces to interact with data in Snowflake.

    13.A financial services company is building a customer support chatbot. They notice that for conversations exceeding 20 turns, the chatbot's response quality degrades significantly, and it seems to forget the user's initial problem statement. What is a likely technical cause and an effective mitigation strategy?

    1. A.The Snowflake warehouse is too small and needs to be resized to handle longer contexts.
    2. B.The total token count of the long conversation history is exceeding the model's context window limit. A strategy like summarizing earlier parts of the conversation should be implemented.
    3. C.The application is hitting API rate limits for the `SNOWFLAKE.CORTEX.COMPLETE` function, resulting in truncated responses.
    4. D.The `session_state` in Streamlit automatically purges old data after a certain number of interactions.
    Show answer & explanation

    Correct answer: BThe total token count of the long conversation history is exceeding the model's context window limit. A strategy like summarizing earlier parts of the conversation should be implemented.

    • A. This is incorrect. The size of the Snowflake warehouse affects query processing speed and concurrency for data operations, but it does not influence the conversational memory or context window of a Large Language Model (LLM). The degradation in response quality is a limitation of the LLM, not a data processing bottleneck.
    • B. This is the correct answer. LLMs have a finite context window, which is the maximum number of tokens they can consider at one time. In long conversations, if the entire chat history is sent with each new turn, the total token count can exceed this limit. When this happens, the oldest parts of the conversation are typically truncated, causing the model to 'forget' the initial context. Summarizing earlier parts of the conversation is a standard and effective mitigation strategy to condense the history, preserve key information, and keep the total token count within the model's limit.
    • C. This is incorrect. Hitting API rate limits would typically result in explicit error messages (e.g., HTTP 429) or a complete failure to get a response. It would not cause a gradual degradation in response quality where the model seems to forget information. The symptoms described do not align with rate-limiting issues.
    • D. This is incorrect. While Streamlit's `session_state` is used to manage the conversation history within the application, it does not automatically purge data after a set number of interactions; the developer controls its contents. The problem described is a fundamental limitation of the underlying LLM's architecture (its context window), not a feature or limitation of the Streamlit application framework.

    2.3 Build chat interfaces to interact with data in Snowflake.

    14.When calling `SNOWFLAKE.CORTEX.COMPLETE`, what is the correct data structure and format for the conversation history argument?

    1. A.A single string with messages separated by newline characters.
    2. B.A JSON object where keys are 'user' and 'assistant' and values are arrays of their respective messages.
    3. C.An array of strings, alternating between user and assistant messages.
    4. D.An array of JSON objects, where each object has a 'role' key (e.g., 'user', 'assistant') and a 'content' key.
    Show answer & explanation

    Correct answer: DAn array of JSON objects, where each object has a 'role' key (e.g., 'user', 'assistant') and a 'content' key.

    • A. Incorrect. A single, unstructured string does not provide the necessary context for the model to distinguish between different speakers (e.g., 'user' vs. 'assistant') in a conversation, which is essential for generating a relevant response.
    • B. Incorrect. This structure, while organized by role, is not the format expected by the function. The function requires a single, chronologically ordered array of messages to understand the conversational flow.
    • C. Incorrect. An array of strings lacks the explicit role attribution needed by the model. The function requires each message to be clearly labeled with who sent it ('user' or 'assistant').
    • D. Correct. According to the Snowflake documentation, the `messages` argument for `SNOWFLAKE.CORTEX.COMPLETE` must be an ARRAY of OBJECTs. Each object in the array represents a single message and must contain two keys: 'role' (specifying the speaker, such as 'user' or 'assistant') and 'content' (containing the message text). This structure preserves the chronological order and context of the entire conversation.

    2.3 Build chat interfaces to interact with data in Snowflake.

    15.Which of the following are valid `role` values when constructing the message history for `SNOWFLAKE.CORTEX.COMPLETE`?(Select 2)

    1. A.`system`
    2. B.`model`
    3. C.`user`
    4. D.`chatbot`
    5. E.`query`
    Show answer & explanation

    Correct answers: A, C`system`; `user`

    • A. Correct. According to the Snowflake documentation, `system` is a valid role. It is used to provide high-level instructions or context that steers the model's behavior for the entire conversation, such as defining its persona or task.
    • B. Incorrect. The valid role for messages generated by the large language model is `assistant`, not `model`. While the concept is similar, `model` is not a recognized value for the `role` key in the message history array.
    • C. Correct. The `user` role is a valid and required role for representing the prompts, questions, or messages sent by the end-user who is interacting with the model.
    • D. Incorrect. Although the application might be a chatbot, the specific role name required by the function for the model's responses is `assistant`. The value `chatbot` is not a valid role.
    • E. Incorrect. `query` describes a type of action or content, not a participant role in the conversation. The valid roles are `system`, `user`, and `assistant`.

    2.4 Use Snowflake Cortex functions in data pipelines.

    16.A pipeline is augmenting a user profile table by generating a short, 15-word biographical summary for each user based on their listed `hobbies` and `profession`. The pipeline runs, but the summaries are often much longer than 15 words. Which two modifications are most likely to resolve this issue?(Select 2)

    1. A.Explicitly state the word count constraint at the end of the prompt, such as `The summary must be exactly 15 words.`
    2. B.Use the `SUBSTRING()` function to truncate the output of the `COMPLETE` function to the first 15 words.
    3. C.Switch to the `SNOWFLAKE.CORTEX.SUMMARIZE` function, as it has a built-in word count parameter.
    4. D.Provide a few examples (few-shot prompting) in the prompt that demonstrate the desired length and style.
    5. E.Increase the virtual warehouse size to give the model more resources to follow instructions.
    Show answer & explanation

    Correct answers: A, DExplicitly state the word count constraint at the end of the prompt, such as `The summary must be exactly 15 words.`; Provide a few examples (few-shot prompting) in the prompt that demonstrate the desired length and style.

    • A. This is a correct approach. Explicitly stating constraints like word count directly in the prompt is a fundamental prompt engineering technique. While not a hard guarantee, it directly instructs the model on the desired output length and is often effective at guiding it to produce more concise results.
    • B. This is not an ideal solution. While truncating the output using SQL functions like `SUBSTRING()` or `SPLIT()` and `ARRAY_SLICE()` would enforce a hard limit, it is a post-processing step that can result in grammatically incorrect, incomplete, or nonsensical summaries. It addresses the length symptom but not the root cause of the model's generation behavior and can severely degrade output quality.
    • C. This is incorrect. The `SNOWFLAKE.CORTEX.SUMMARIZE` function is designed to summarize a provided block of text. Furthermore, it does not have a built-in parameter to control the word count of the output summary. Therefore, this option is based on a flawed premise.
    • D. This is a correct and highly effective approach. Providing a few examples of inputs and their corresponding desired outputs (a technique known as few-shot prompting) allows the model to learn the expected format, tone, and length implicitly. This is often more powerful than explicit instructions alone for achieving consistent results.
    • E. This is incorrect. The size of the virtual warehouse affects the computational resources available for running queries, influencing performance and concurrency. It has no impact on the underlying large language model's ability to interpret and follow instructions within a prompt.

    2.4 Use Snowflake Cortex functions in data pipelines.

    17.A data engineer is building a pipeline to extract information from interview transcripts. The `COMPLETE` function needs to identify the 'strengths' and 'weaknesses' discussed. The initial prompt, `Extract strengths and weaknesses from this text: [text]`, is performing poorly. Which two prompt modifications represent best practices for improving extraction accuracy?(Select 2)

    1. A.Add a 'persona' to the prompt, such as `You are an expert HR analyst.`
    2. B.Decrease the number of tokens in the input text by summarizing it first.
    3. C.Provide an example of a transcript and the desired JSON output (few-shot prompting).
    4. D.Increase the `temperature` to allow the model to find more creative strengths.
    5. E.Ask the model to return the output in a specific, structured format like JSON.
    Show answer & explanation

    Correct answers: A, CAdd a 'persona' to the prompt, such as `You are an expert HR analyst.`; Provide an example of a transcript and the desired JSON output (few-shot prompting).

    • A. This is a correct best practice. Assigning a persona or role (e.g., 'expert HR analyst') provides the model with crucial context. It guides the model to interpret the transcript from a specific professional viewpoint, significantly improving its ability to accurately identify what constitutes a relevant strength or weakness in a business context.
    • B. This is incorrect. Summarizing the text before extraction is a flawed approach because the summarization process is inherently lossy. It is highly likely to omit the specific details, nuances, and direct quotes that the extraction task is designed to find, leading to a decrease in accuracy.
    • C. This is a correct best practice. Providing one or more examples of the input and desired output is known as few-shot prompting and is one of the most effective ways to improve model accuracy and consistency. It explicitly shows the model the task, the type of information to look for, and the expected structure of the result, leaving less room for misinterpretation.
    • D. This is incorrect. The `temperature` parameter controls the randomness of the output. For factual extraction tasks, a low temperature (e.g., 0 or 0.1) is recommended to ensure deterministic and consistent results based on the source text. Increasing the temperature would encourage creativity and hallucination, which is the opposite of what is needed for accurate extraction.
    • E. This is incorrect in the context of choosing the *best* two options for accuracy. While requesting a structured format like JSON is a best practice for making the output machine-readable, its primary impact is on the output's structure, not the accuracy of the extracted content itself. A model can still produce inaccurate information within a perfect JSON format. Techniques like assigning a persona (A) or providing examples (C) have a more direct and powerful impact on improving the accuracy of the content being identified.

    2.5 Run third-party models in Snowflake.

    18.A developer has successfully built a Docker image for their service and is attempting to push it to a Snowflake image repository using the command `docker push my_org-my_acct.registry.snowflakecomputing.com/my_db/my_schema/my_repo/my_image:v1`. The push fails with an 'authentication required' error. The developer has already used `docker login` with their Snowflake username and password. What are the most likely reasons for this failure?(Select 3)

    1. A.The developer's current role in the Snowflake session does not have the `WRITE` privilege on the image repository.
    2. B.The `docker login` command for Snowflake requires a personal access token or key-pair authentication, not a password.
    3. C.The fully qualified name of the image repository is missing the cloud region.
    4. D.The Docker daemon on the developer's machine is not running.
    5. E.The compute pool associated with the service has not been started.
    Show answer & explanation

    Correct answers: A, B, CThe developer's current role in the Snowflake session does not have the `WRITE` privilege on the image repository.; The `docker login` command for Snowflake requires a personal access token or key-pair authentication, not a password.; The fully qualified name of the image repository is missing the cloud region.

    • A. This is a correct answer. Pushing an image to a repository is a write operation. To perform this action, the user's active role in Snowflake must have the `WRITE` privilege on the target image repository. If this privilege is missing, Snowflake will reject the push operation, which can result in an authentication or authorization error.
    • B. This is a correct answer. According to Snowflake documentation, authenticating with the Snowflake image registry via `docker login` does not support using a standard Snowflake password. Instead, you must use a token obtained through key-pair authentication. The prompt explicitly states the developer used a password, which is an invalid authentication method for this operation and would directly cause an 'authentication required' failure.
    • C. This is a correct answer. The fully qualified domain name (FQDN) for a Snowflake image repository must include the organization, account, and cloud region, in the format `<org>-<account>.<region>.registry.snowflakecomputing.com`. The URL in the command is missing the `<region>` identifier. This malformed URL would prevent the Docker client from resolving and connecting to the correct registry endpoint, leading to a failure that can manifest as an authentication error.
    • D. This is incorrect. If the Docker daemon were not running on the developer's local machine, the error message would be a local, client-side error, such as 'Cannot connect to the Docker daemon at unix:///var/run/docker.sock'. It would not be an 'authentication required' error, which originates from the remote registry server.
    • E. This is incorrect. A compute pool is the infrastructure used to *run* services from container images. The image repository is the storage for those images. The state of a compute pool is completely independent of the ability to push or pull images from the repository. Therefore, a stopped compute pool would not cause an authentication error during a `docker push`.

    2.5 Run third-party models in Snowflake.

    19.What is the primary purpose of the `spec.yaml` (specification file) in the context of Snowpark Container Services?

    1. A.To define the `conda` and `pip` dependencies for a Snowpark Python environment.
    2. B.To declare the desired state of a service or job, including the container images, endpoints, and resource requirements.
    3. C.To configure the networking rules and access policies for a specific compute pool.
    4. D.To build a Docker image from a Dockerfile and push it to the Snowflake image repository.
    Show answer & explanation

    Correct answer: BTo declare the desired state of a service or job, including the container images, endpoints, and resource requirements.

    • A. Incorrect. Defining Python dependencies using `conda` or `pip` is typically done in an `environment.yml` or `requirements.txt` file, which might be used when building the container image. The `spec.yaml` file is used for deploying and configuring the service itself, not managing the internal environment of the container.
    • B. Correct. The `spec.yaml` file is the core manifest for a Snowpark Container Service or Job. It uses a declarative syntax to define the desired state, specifying which container images to run, the resources to allocate (e.g., CPU, memory, GPUs), the number of instances, and how the service should be exposed via endpoints.
    • C. Incorrect. While networking is a crucial part of Snowpark Container Services, the `spec.yaml` file defines the service's endpoints, not the underlying network rules or access policies for the compute pool. These are configured separately using SQL commands like `CREATE NETWORK RULE` and by associating them with the compute pool or service.
    • D. Incorrect. Building a Docker image from a Dockerfile (`docker build`) and pushing it to the Snowflake image repository (`docker push`) are prerequisite steps. The `spec.yaml` file *references* the image that has already been built and pushed; it does not perform the build or push operations itself.

    2.5 Run third-party models in Snowflake.

    20.A service is running in SPCS. A developer needs to get a shell inside the running container to perform interactive debugging. The service is named `INFERENCE_SVC` and the container is named `MODEL-CONTAINER`. Which command should they use?

    1. A.CALL SYSTEM$EXECUTE_SERVICE('INFERENCE_SVC', 'MODEL-CONTAINER', 'bash');
    2. B.EXECUTE SERVICE IN INFERENCE_SVC CONTAINER 'MODEL-CONTAINER' COMMAND 'bash';
    3. C.EXECUTE SERVICE 'INFERENCE_SVC' CONTAINER_NAME='MODEL-CONTAINER' COMMAND='bash';
    4. D.EXECUTE IMMEDIATE 'bash' IN SERVICE INFERENCE_SVC CONTAINER 'MODEL-CONTAINER';
    Show answer & explanation

    Correct answer: BEXECUTE SERVICE IN INFERENCE_SVC CONTAINER 'MODEL-CONTAINER' COMMAND 'bash';

    • A. Incorrect. The `SYSTEM$EXECUTE_SERVICE` system function is used to invoke a specific method defined within a service instance, not for executing arbitrary commands like launching a shell. The syntax is incorrect for the goal of interactive debugging.
    • B. Correct. This is the correct command structure for executing a command, such as starting a `bash` shell, inside a specific container of a running Snowpark Container Service. The `EXECUTE SERVICE` command followed by the service name, the `CONTAINER` keyword with the container name, and the `COMMAND` keyword with the command to run is the proper syntax for this task.
    • C. Incorrect. The syntax for the `EXECUTE SERVICE` command is invalid. It does not use keyword-argument pairs like `CONTAINER_NAME=` or `COMMAND=`. Instead, it uses positional keywords (`CONTAINER`, `COMMAND`) followed by their respective values.
    • D. Incorrect. `EXECUTE IMMEDIATE` is a SQL command used to compile and execute a string containing a SQL statement dynamically. It is not used for interacting with service containers or executing shell commands within them.

    2.5 Run third-party models in Snowflake.

    21.What are three key pieces of metadata you can view for a model version that has been logged to the Snowflake Model Registry?(Select 3)

    1. A.The Git commit hash of the code that trained the model.
    2. B.The Python `conda` and `pip` dependencies.
    3. C.The tags and aliases associated with the version (e.g., 'prod', 'staging').
    4. D.The name of the virtual warehouse used to log the model.
    5. E.Custom metrics logged by the user (e.g., accuracy, F1-score).
    Show answer & explanation

    Correct answers: B, C, EThe Python `conda` and `pip` dependencies.; The tags and aliases associated with the version (e.g., 'prod', 'staging').; Custom metrics logged by the user (e.g., accuracy, F1-score).

    • A. This is incorrect. The Git commit hash is not a standard metadata field automatically captured by the Snowflake Model Registry. This information pertains to source code version control systems and is not a direct attribute of the model artifact itself within the registry.
    • B. This is correct. The Python `conda` and `pip` dependencies are fundamental metadata captured by the registry. When a model is logged, Snowpark ML inspects the environment and saves these dependencies to ensure that the exact environment can be replicated for consistent and reproducible model deployment and inference.
    • C. This is correct. Tags and aliases are key organizational metadata within the Snowflake Model Registry. Aliases (like 'prod' or 'staging') act as mutable pointers to specific versions, while tags are static key-value pairs. They are crucial for managing the model lifecycle and implementing MLOps workflows.
    • D. This is incorrect. The name of the virtual warehouse used for logging is considered part of the execution context, not persistent metadata of the model version itself. The registry focuses on attributes of the model and its environment, not the computational infrastructure used to interact with it.
    • E. This is correct. The Snowflake Model Registry is designed to store custom performance metrics. The `log_model` function has a dedicated `metrics` parameter that allows users to record key performance indicators like accuracy or F1-score. This metadata is essential for comparing different model versions and making informed decisions about which version to deploy.

    2.4 Use Snowflake Cortex functions in data pipelines.

    22.A pipeline is being developed to generate SQL queries from natural language questions for a business intelligence tool. The input is a table `NL_QUESTIONS (QUESTION_ID, QUESTION_TEXT)` and a schema definition. The prompt is structured as follows: `Given the schema [schema], write a SQL query for the question: [question]`. The generated SQL is often syntactically incorrect. What is the MOST effective way to modify the pipeline to improve the quality of the generated SQL?

    1. A.Decrease the `temperature` setting in the `COMPLETE` function options to 0 to reduce randomness.
    2. B.Use `SNOWFLAKE.CORTEX.TEXT_TO_SQL` instead of `COMPLETE` for this specific task.
    3. C.Run the generated SQL inside a `TRY_...CATCH` block and ask the LLM to fix it if it fails.
    4. D.Use Snowflake Cortex Analyst with a well-defined semantic model to convert natural language questions into accurate SQL.
    Show answer & explanation

    Correct answer: DUse Snowflake Cortex Analyst with a well-defined semantic model to convert natural language questions into accurate SQL.

    • A. Lowering temperature reduces randomness but does not address the root cause of syntactically incorrect SQL. The `COMPLETE` function (specifically `AI_COMPLETE`) is a general-purpose LLM completion function not specialized for text-to-SQL tasks. It lacks the domain-specific reasoning and schema grounding needed to consistently produce valid Snowflake SQL, so adjusting temperature alone will not reliably fix syntax errors.
    • B. While the intent to use a specialized text-to-SQL mechanism is correct, `SNOWFLAKE.CORTEX.TEXT_TO_SQL` is not a directly callable SQL function in Snowflake. The recommended approach is to use Snowflake Cortex Analyst, which provides text-to-SQL capabilities powered by specialized models like Arctic-Text2SQL-R1.5 and relies on a semantic model for accuracy. Simply replacing `COMPLETE` with a non-existent function will not work.
    • C. This approach adds error handling but does not fundamentally improve the initial SQL generation quality. It relies on the same general-purpose LLM to correct its own mistakes, which may still produce incorrect SQL. The core issue is the lack of a specialized text-to-SQL system with schema grounding, not the absence of retry logic.
    • D. Snowflake Cortex Analyst is the officially recommended feature for converting natural language to SQL. It achieves high accuracy (90%+) by using specialized reasoning models (e.g., Arctic-Text2SQL-R1.5) and a semantic model (YAML file or Semantic View) that maps business terms to the database schema. This grounding ensures syntactically correct and contextually accurate SQL, directly addressing the pipeline's quality issues.

    Domain 3: Snowflake Gen AI Governance

    3.2 Set guardrails to filter out harmful or unsafe LLM responses.

    23.Which component of the Snowflake AI & ML ecosystem is `Cortex Guard` a feature of?

    1. A.Snowpark ML Modeling API
    2. B.Snowflake Feature Store
    3. C.Snowflake Cortex LLM Functions
    4. D.Streamlit in Snowflake
    Show answer & explanation

    Correct answer: CSnowflake Cortex LLM Functions

    • A. Incorrect. The Snowpark ML Modeling API is designed for building, training, and deploying custom machine learning models within Snowflake. It is not directly related to the governance or guardrail features for Large Language Models (LLMs).
    • B. Incorrect. The Snowflake Feature Store is a centralized repository for storing, managing, and sharing curated data features for machine learning models. Its purpose is to streamline ML feature engineering, not to filter LLM responses.
    • C. Correct. Cortex Guard is a key feature within the Snowflake Cortex LLM Functions. It acts as an intelligent guardrail to detect and filter harmful or unsafe content in both user prompts and LLM responses, ensuring responsible and secure AI application development.
    • D. Incorrect. Streamlit in Snowflake is a framework for building and sharing interactive data applications. While an application built with Streamlit might call a Cortex LLM Function that uses Cortex Guard, Cortex Guard itself is not a native feature of Streamlit.

    3.2 Set guardrails to filter out harmful or unsafe LLM responses.

    24.An application is processing user-submitted text to identify potential policy violations. The application calls `SNOWFLAKE.CORTEX.COMPLETE` with a prompt that asks the LLM to classify the text. Cortex Guard is enabled. The developers observe that for some inputs, the function returns a `status` of 'blocked'. What does this status indicate, and what are the implications?(Select 3)

    1. A.The status 'blocked' indicates that the user's prompt itself was deemed harmful or unsafe.
    2. B.The LLM was not invoked, saving computational resources.
    3. C.The LLM generated a harmful response, which was then blocked.
    4. D.This status is a clear signal of a potential bad actor or a malicious use case that should be logged for security review.
    5. E.The 'blocked' status is a transient error and the query should be retried immediately.
    Show answer & explanation

    Correct answers: A, C, DThe status 'blocked' indicates that the user's prompt itself was deemed harmful or unsafe.; The LLM generated a harmful response, which was then blocked.; This status is a clear signal of a potential bad actor or a malicious use case that should be logged for security review.

    • A. This is a correct statement describing one of the two primary reasons for a 'blocked' status. Snowflake Cortex Guard analyzes the input prompt before sending it to the Large Language Model (LLM). If the prompt is identified as containing harmful or unsafe content, Cortex Guard blocks it from being processed further.
    • B. This statement is only partially correct and therefore incorrect as a definitive implication. If the prompt itself is blocked (as in option A), the LLM is indeed not invoked, saving resources. However, Cortex Guard also blocks harmful responses after the LLM has already run. Since the 'blocked' status can apply to either case, this is not a universally true implication.
    • C. This is a correct statement describing the second primary reason for a 'blocked' status. Even if the initial prompt is safe, the LLM might generate a harmful response. Cortex Guard also analyzes the LLM's output and will block it from being returned to the user if it violates safety policies. In this scenario, the LLM was invoked and consumed resources.
    • D. This is a correct and crucial implication. A 'blocked' status is a key security signal that the guardrails are functioning as intended. It indicates an attempt to input or generate policy-violating content. Best practices for security and governance require logging these events for auditing, monitoring for malicious use patterns, and refining safety policies.
    • E. This is incorrect. The 'blocked' status is not a transient technical error. It is a deliberate and final state for a given request, indicating a policy violation was detected by the safety feature. Retrying the exact same request would simply be blocked again.

    3.2 Set guardrails to filter out harmful or unsafe LLM responses.

    25.A compliance officer wants to know if Cortex Guard can be customized with company-specific rules, for example, to block any mention of a secret internal project codenamed 'Project Atlas'. Based on the current capabilities of Cortex Guard, what is the correct assessment?

    1. A.Yes, Cortex Guard can be customized by providing a configuration object with custom keywords and rules.
    2. B.No, Cortex Guard is a managed safety model with predefined categories and cannot be customized with user-specific rules.
    3. C.Yes, but only by fine-tuning the underlying safety model, which requires Snowpark Container Services.
    4. D.No, custom rules must be implemented outside of Cortex Guard, for example, by using a post-processing SQL `REGEXP_LIKE` filter on the output.
    Show answer & explanation

    Correct answer: BNo, Cortex Guard is a managed safety model with predefined categories and cannot be customized with user-specific rules.

    • A. Incorrect. Snowflake Cortex Guard operates with a set of predefined safety categories (e.g., hate, violence, self-harm) and does not currently expose a configuration object or API for users to add custom keywords or business-specific filtering rules.
    • B. Correct. This statement accurately describes the current functionality of Cortex Guard. It is a managed, pre-trained safety model designed to address general safety concerns. It does not support user-defined customizations for company-specific contexts, such as blocking internal project names.
    • C. Incorrect. Fine-tuning the underlying Cortex Guard model is not a feature offered by Snowflake. While Snowpark Container Services can be used to run custom models, it is not a mechanism for modifying or customizing the built-in Cortex Guard function.
    • D. Incorrect. While the technique described (using post-processing SQL filters) is a valid and common pattern for implementing custom rules, this option is not the best answer. The question asks for an assessment of Cortex Guard's capabilities, not for alternative workarounds. Option B provides the most direct and accurate assessment of the tool itself.

    3.3 Monitor and optimize Snowflake Cortex costs.

    26.How are the costs for using Snowflake Cortex LLM functions (e.g., `COMPLETE`, `TRANSLATE`) billed to a customer's account?

    1. A.They are billed as a separate line item on the monthly invoice, distinct from compute and storage.
    2. B.They are billed as serverless credits, consumed from the account's overall credit balance.
    3. C.They are included for free as part of the Enterprise Edition feature set.
    4. D.They are billed based on the runtime of the virtual warehouse executing the function.
    Show answer & explanation

    Correct answer: BThey are billed as serverless credits, consumed from the account's overall credit balance.

    • A. Incorrect. The cost for Cortex LLM functions is not presented as a fundamentally separate line item distinct from all compute. Instead, it is billed as serverless compute, which is paid for using credits from the account's general credit balance.
    • B. Correct. Snowflake Cortex LLM functions operate on a serverless compute model. Snowflake manages the underlying resources, and the usage is measured and billed in serverless credits. These credits are deducted from the customer's overall Snowflake credit balance, consistent with other serverless features like Snowpipe and Automatic Clustering.
    • C. Incorrect. Snowflake Cortex LLM functions are a pay-per-use service and are not included for free as part of any Snowflake edition, including Enterprise Edition. Usage directly incurs costs.
    • D. Incorrect. While a query calling a Cortex function runs on a user's virtual warehouse, the LLM function itself executes on separate, Snowflake-managed serverless infrastructure. Therefore, the cost is not tied to the virtual warehouse's runtime but is instead billed based on the serverless compute consumed by the function.

    3.3 Monitor and optimize Snowflake Cortex costs.

    27.A platform administrator wants to implement a proactive alert that notifies the security team via email whenever a single call to `SNOWFLAKE.CORTEX.COMPLETE` by any user exceeds 20,000 total tokens. Which TWO Snowflake components are best suited to build this monitoring solution?(Select 2)

    1. A.A Snowflake Task that periodically queries `SNOWFLAKE.ACCOUNT_USAGE.CORTEX_FUNCTIONS_QUERY_USAGE_HISTORY`.
    2. B.A Stream on the `QUERY_HISTORY` view to capture new function calls in real-time.
    3. C.A call to the `SYSTEM$SEND_EMAIL` notification integration from a stored procedure.
    4. D.A Resource Monitor with a credit quota set to trigger at 20,000.
    5. E.A `BEFORE` query event handler implemented with a secure UDF.
    Show answer & explanation

    Correct answers: A, CA Snowflake Task that periodically queries `SNOWFLAKE.ACCOUNT_USAGE.CORTEX_FUNCTIONS_QUERY_USAGE_HISTORY`.; A call to the `SYSTEM$SEND_EMAIL` notification integration from a stored procedure.

    • A. Correct. A Snowflake Task is the standard automation component for running SQL code on a schedule. It is perfectly suited for periodically querying the `SNOWFLAKE.ACCOUNT_USAGE.CORTEX_FUNCTIONS_QUERY_USAGE_HISTORY` view. This view is specifically designed to track Cortex function usage and contains the `TOTAL_TOKENS` column needed to identify calls exceeding the threshold. This combination forms the core of the monitoring and orchestration logic.
    • B. Incorrect. This is not a viable solution because Snowflake Streams cannot be created on views, and `QUERY_HISTORY` is a view in the `ACCOUNT_USAGE` schema. Streams can only be created on tables to capture change data.
    • C. Correct. This component is essential for the notification part of the solution. Once the monitoring logic (implemented in a Task and Stored Procedure) detects a query that has exceeded the token threshold, the `SYSTEM$SEND_EMAIL` system function is used to send the email alert. A stored procedure would encapsulate this logic, and a notification integration must be configured beforehand.
    • D. Incorrect. Resource Monitors are used to track and control Snowflake credit consumption for virtual warehouses. Their thresholds and quotas are measured in credits, not in function-specific metrics like LLM tokens. It is not possible to configure a Resource Monitor to trigger based on the token count of a function call.
    • E. Incorrect. A `BEFORE` query event handler executes code *before* a query is run. At this stage, the `SNOWFLAKE.CORTEX.COMPLETE` function has not been executed, so its token consumption is unknown. This type of handler is used for pre-execution validation or modification, not for monitoring post-execution results.

    3.3 Monitor and optimize Snowflake Cortex costs.

    28.What is the primary purpose of the `SNOWFLAKE.ACCOUNT_USAGE.CORTEX_FUNCTIONS_QUERY_USAGE_HISTORY` view, and how does it differ from `CORTEX_FUNCTIONS_USAGE_HISTORY`?

    1. A.It provides an aggregated summary of token usage per user, per day, while the other view shows warehouse-level usage.
    2. B.It contains the full text of prompts and responses, which is not available in any other view.
    3. C.It breaks down usage by individual query ID, offering the most granular level of detail, whereas the other view aggregates usage over a time window.
    4. D.It is used exclusively for monitoring Cortex Search costs, while the other view is for LLM functions.
    Show answer & explanation

    Correct answer: CIt breaks down usage by individual query ID, offering the most granular level of detail, whereas the other view aggregates usage over a time window.

    • A. Incorrect. The `CORTEX_FUNCTIONS_QUERY_USAGE_HISTORY` view is granular and provides data per query, not an aggregated summary per user per day. The `CORTEX_FUNCTIONS_USAGE_HISTORY` view aggregates by the hour, not at the warehouse level.
    • B. Incorrect. For privacy, security, and storage efficiency, usage and history views in Snowflake do not contain the actual content of prompts and responses. They track metadata and consumption metrics like token counts and credits used.
    • C. Correct. The `CORTEX_FUNCTIONS_QUERY_USAGE_HISTORY` view is designed for granular analysis, providing detailed usage metrics (like tokens and credits) for each individual `QUERY_ID`. In contrast, the `CORTEX_FUNCTIONS_USAGE_HISTORY` view provides a higher-level summary, aggregating credit usage into hourly time windows.
    • D. Incorrect. Both views are designed to monitor a range of Cortex functions, not just a specific type like Cortex Search. The key difference between them is the level of aggregation (per-query vs. hourly), not the type of function being monitored.

    3.4 Use Snowflake AI observability tools.

    29.In the context of Trulens, what is the conceptual difference between logging and tracing?

    1. A.Logging is for errors only, while tracing captures successful executions.
    2. B.Tracing captures the causal, time-ordered structure of an operation's workflow, while logging captures discrete, timestamped events within that workflow.
    3. C.Logging writes data to a local file, while tracing writes data directly to a Snowflake table.
    4. D.Tracing is an automated process, while logging requires explicit `print()` statements in the code.
    Show answer & explanation

    Correct answer: BTracing captures the causal, time-ordered structure of an operation's workflow, while logging captures discrete, timestamped events within that workflow.

    • A. Incorrect. This statement is overly simplistic. Logging is not restricted to errors; it captures a wide range of discrete events, including informational messages, warnings, and successful operations. Similarly, tracing captures the entire workflow, which can include both successful and failed steps.
    • B. Correct. This accurately describes the core difference. Tracing provides a holistic, end-to-end view of a request or operation as it moves through a system, showing the causal, time-ordered sequence of events (spans). Logging, in contrast, captures discrete, isolated, timestamped events from specific components within that workflow, which are useful for detailed debugging at specific points.
    • C. Incorrect. The storage destination is a matter of configuration, not a fundamental conceptual difference. Both logs and traces can be configured to write to various destinations, such as local files, cloud storage, or directly to observability platforms like Snowflake.
    • D. Incorrect. Both logging and tracing can be highly automated through instrumentation. Modern logging frameworks go far beyond simple `print()` statements and can automatically capture rich contextual information. Tracing is also typically automated by instrumenting code to capture the flow of operations.

    3.4 Use Snowflake AI observability tools.

    30.The `COMPLETIONS` event table stores a wealth of information. Which two pieces of information are captured by default for a standard Cortex `COMPLETE` function call without any custom attributes being added?(Select 2)

    1. A.The user's role and virtual warehouse name.
    2. B.The model name used for the completion.
    3. C.The groundedness and relevance scores.
    4. D.The total number of tokens used in the request/response.
    5. E.The SHA hash of the Python script that made the call.
    Show answer & explanation

    Correct answers: B, DThe model name used for the completion.; The total number of tokens used in the request/response.

    • A. Incorrect. The `COMPLETIONS` event table itself does not contain default columns for the user's role or the virtual warehouse name. While this information can be found by joining the event table's `QUERY_ID` with the `SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY` view, it is not captured directly within the event table.
    • B. Correct. The `MODEL_NAME` is a standard, default column in the `COMPLETIONS` event table. Capturing which model was used for a specific completion is essential for observability, auditing, and performance tracking.
    • C. Incorrect. Groundedness and relevance scores are metrics typically associated with Retrieval-Augmented Generation (RAG) systems, not the standard `COMPLETE` function. These scores are not captured by default and would require a different function (like `SNOWFLAKE.CORTEX.ANSWER`) or custom implementation to be logged.
    • D. Correct. The `TOTAL_TOKENS` used by the request and response is a fundamental piece of metadata captured by default in the `COMPLETIONS` event table. This information is crucial for monitoring costs, managing usage, and analyzing performance.
    • E. Incorrect. This level of application-specific detail, such as the hash of a client-side script, is not part of the standard metadata collected by Snowflake for a Cortex function call. This would require custom logging implemented by the developer.

    3.4 Use Snowflake AI observability tools.

    31.When using Snowflake's AI observability, where are evaluation metrics, such as Groundedness or custom scores, typically stored?

    1. A.In the `SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY` view, attached to the query profile.
    2. B.Directly within the `OUTPUT` column of the `COMPLETIONS` table, appended to the LLM's response.
    3. C.As separate, user-defined tables or as custom events/attributes within the main event table.
    4. D.In a secure, internal stage that is only accessible by the Trulens SDK.
    Show answer & explanation

    Correct answer: CAs separate, user-defined tables or as custom events/attributes within the main event table.

    • A. Incorrect. The `SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY` view is used for tracking general SQL query execution details, such as execution time, warehouse usage, and rows produced. It is not designed for storing application-level AI observability metrics like Groundedness scores.
    • B. Incorrect. The `OUTPUT` column of a table logging LLM responses (e.g., a `COMPLETIONS` table) is intended to store the raw text generated by the model. Embedding structured evaluation metrics within this column would make them difficult to query, aggregate, and analyze systematically.
    • C. Correct. This is the most flexible and standard approach. Snowflake's observability framework allows for logging custom events or adding custom attributes (e.g., a 'groundedness_score' attribute) to the main event table. Alternatively, for more complex or structured evaluations, creating separate user-defined tables to store these metrics is a common best practice, enabling powerful analysis by joining them with the trace data.
    • D. Incorrect. While SDKs like TruLens integrate with Snowflake, they do so by writing data into queryable tables for analysis and observability. Storing final metrics in a secure, inaccessible internal stage would defeat the purpose of observability, which is to make this data accessible for monitoring and analysis via SQL. Stages are primarily used for file storage, not as the primary repository for structured, queryable metrics.

    3.1 Set up model access controls.

    32.A developer is building an external application that calls the Cortex LLM REST API. The application authenticates using key-pair authentication. The user associated with the public key has the CORTEX_USER role. When the application calls the API to use the `mistral-large` model, it receives an HTTP 403 error: 'Model not allowed for the user.' The administrator checks and confirms: `ALTER ACCOUNT SET CORTEX_MODELS_ALLOWLIST = 'mistral-large';`. What are the most likely causes of this error that the developer and administrator should investigate?(Select 2)

    1. A.The JWT generated for key-pair authentication has expired.
    2. B.The CORTEX_MODELS_ALLOWLIST parameter has been overridden at the user or session level to a different value that excludes `mistral-large`.
    3. C.The user's default role does not have the necessary privileges, and the correct role (CORTEX_USER) was not specified in the connection request.
    4. D.The Snowflake account is running on a cloud provider region where `mistral-large` is not yet available.
    5. E.The private key used to sign the JWT does not match the public key assigned to the Snowflake user.
    Show answer & explanation

    Correct answers: B, CThe CORTEX_MODELS_ALLOWLIST parameter has been overridden at the user or session level to a different value that excludes `mistral-large`.; The user's default role does not have the necessary privileges, and the correct role (CORTEX_USER) was not specified in the connection request.

    • A. Incorrect. An expired or invalid JWT would result in an authentication failure (e.g., HTTP 401 Unauthorized), not an authorization error about model access. The error message 'Model not allowed for the user' indicates that authentication was successful, but the user lacks the necessary permissions for the requested model.
    • B. Correct. Snowflake parameters follow a hierarchy (Account > User > Session). Although the `CORTEX_MODELS_ALLOWLIST` is set correctly at the account level, it can be overridden by a more specific setting at the user or session level. If the parameter was altered for the specific user to a list that excludes `mistral-large`, it would take precedence and cause this error.
    • C. Correct. When connecting via the REST API, if a specific role is not included in the JWT scope claim, Snowflake uses the user's default role for the session. If this default role has not been granted the CORTEX_USER database role or does not have the required privileges, access will be denied, resulting in the 'Model not allowed for the user' error, even if the user has been granted the CORTEX_USER role separately.
    • D. Incorrect. If a model were unavailable in a specific cloud provider region, the error message would typically indicate that the model is not found or not supported in that region. The received error, 'Model not allowed for the user,' specifically points to a permissions or governance issue, not a service availability problem.
    • E. Incorrect. A mismatch between the private key used for signing and the public key stored in Snowflake would cause the authentication to fail entirely. This would result in an authentication error (e.g., HTTP 401 Unauthorized) with a message like 'Invalid JWT token,' preventing the session from even being established.

    3.1 Set up model access controls.

    33.What is the default value of the CORTEX_MODELS_ALLOWLIST parameter if it is never explicitly set at any level?

    1. A.An empty string ('')
    2. B.NULL
    3. C.An asterisk ('*')
    4. D.A comma-separated list of all Snowflake-hosted models.
    Show answer & explanation

    Correct answer: CAn asterisk ('*')

    • A. Incorrect. Setting the parameter to an empty string ('') is an explicit action to disallow access to all Snowflake-hosted models. This is the opposite of the default behavior.
    • B. Incorrect. While an unset parameter might conceptually be thought of as NULL, the actual default value for CORTEX_MODELS_ALLOWLIST is `'*'`. The default behavior is permissive (all models allowed), not restrictive.
    • C. Correct. According to Snowflake documentation and the `SHOW PARAMETERS` command, the default value for the CORTEX_MODELS_ALLOWLIST parameter is an asterisk ('*'). This wildcard means that by default, access to all Snowflake-hosted models is allowed. To restrict access, an administrator must explicitly set the parameter to a different value.
    • D. Incorrect. The default is a simple wildcard ('*') to represent all models, not an explicitly populated, comma-separated list of every available model name.

    3.1 Set up model access controls.

    34.When using the SNOWFLAKE.CORTEX.COMPLETE function with a Snowflake-hosted model, where is the model inference (the computation) performed?

    1. A.On the client machine that executed the SQL query.
    2. B.Within the user's virtual warehouse.
    3. C.On dedicated, Snowflake-managed compute resources within the Snowflake service layer.
    4. D.By a third-party model provider's API, external to Snowflake's environment.
    Show answer & explanation

    Correct answer: COn dedicated, Snowflake-managed compute resources within the Snowflake service layer.

    • A. Incorrect. The client machine (e.g., a local machine running SnowSQL or a BI tool) only submits the SQL query to the Snowflake platform. All heavy computation, including model inference, is performed securely within the Snowflake cloud environment, not on the local client.
    • B. Incorrect. While a user's virtual warehouse must be active to initiate the SQL query, the actual model inference computation for Snowflake Cortex functions does not run on or consume credits from that warehouse. Instead, it utilizes separate, serverless resources managed by Snowflake.
    • C. Correct. Snowflake Cortex functions are designed as serverless features. The model inference computation is executed on a pool of dedicated, Snowflake-managed compute resources that are part of the Snowflake service layer. This abstracts the compute management from the user, and billing is based on usage (e.g., tokens processed) rather than virtual warehouse uptime.
    • D. Incorrect. The question specifies a 'Snowflake-hosted model' being used with `SNOWFLAKE.CORTEX.COMPLETE`. This means the entire process, including inference, occurs securely within the Snowflake ecosystem. Calling a third-party API would typically be done through an external function, not this built-in function.

    3.1 Set up model access controls.

    35.A new Snowflake feature rollout includes a new LLM named `super-model-xl`. A company has their CORTEX_MODELS_ALLOWLIST explicitly set to 'llama3-8b, mixtral-8x7b'. After the feature rollout, what access will users have to `super-model-xl`?

    1. A.No access, because it is not in the explicitly defined allowlist.
    2. B.Full access, because new models are automatically added to existing allowlists.
    3. C.Access will be granted only to users with the ACCOUNTADMIN role.
    4. D.Access will be determined by a new, separate parameter called NEW_MODELS_ALLOWLIST.
    Show answer & explanation

    Correct answer: ANo access, because it is not in the explicitly defined allowlist.

    • A. Correct. The `CORTEX_MODELS_ALLOWLIST` parameter acts as a strict governance control, explicitly defining which Snowflake Cortex models are accessible within the account. Since the allowlist has been set and `super-model-xl` is not included in it, the model will be inaccessible to all users until an administrator explicitly adds it to the list.
    • B. Incorrect. The primary purpose of an allowlist is to control access. Automatically adding new models would defeat this governance objective. To grant access to a new model, an administrator must explicitly update the `CORTEX_MODELS_ALLOWLIST` parameter to include it.
    • C. Incorrect. While the `ACCOUNTADMIN` role (or a role with the necessary privileges) is required to modify the `CORTEX_MODELS_ALLOWLIST` parameter, the role itself does not grant the ability to bypass the list's restrictions for model usage. The governance control applies to all users, including administrators.
    • D. Incorrect. Snowflake uses a single parameter, `CORTEX_MODELS_ALLOWLIST`, for this specific governance function. There is no separate parameter like `NEW_MODELS_ALLOWLIST` for managing access to newly introduced models.

    Want the full experience?

    These are just samples. Practice the full Snowflake SnowPro Specialty: Gen AI (GES-C01) question bank in quiz mode — free, no signup, with domain practice and exam simulation.