SnowPro Specialty: Gen AI exam dumps

SnowPro Specialty: Gen AI practice question 25 of 287

SnowPro® Specialty: Gen AI. Expert level, Snowflake. Free question with the correct answer and a full explanation.

SnowPro Specialty: Gen AI Question 25

Single answerCortex LLM Functions

A retail analytics team stores customer support cases in a Snowflake table and wants to generate a short summary for each case directly in SQL. They need a solution that can be embedded in a SELECT statement, runs inside Snowflake, and returns a text response from a supported large language model without building a separate service. Which approach best meets these requirements?

  1. A

    Use the SNOWFLAKE.CORTEX.COMPLETE function in the SQL query, passing a prompt built from each support case row and specifying a supported model.

  2. B

    Create a JavaScript stored procedure that calls an external REST API for summarization, because Cortex LLM functions cannot be invoked from SQL queries.

  3. C

    Use the AI_EMBED function to generate a vector for each support case and treat the vector output as the summary text.

  4. D

    Export the support cases to a stage, fine-tune a custom model outside Snowflake, and reload summaries, because Cortex LLM functions only work with unstructured files.

Show answer and explanation

Correct answer: A

Explanation

The best answer is to use SNOWFLAKE.CORTEX.COMPLETE because Cortex LLM functions are meant to bring LLM-powered generation directly into Snowflake SQL workflows. For practical use cases like summarizing support cases, analysts and engineers can construct prompts from table columns and call the function in SELECT queries, views, or downstream pipelines. This aligns with Snowflake guidance for keeping AI processing close to governed data. By contrast, embedding functions such as AI_EMBED are for vector generation rather than text generation, and external API orchestration is only needed when built-in Cortex capabilities do not meet the requirement. Refer to Snowflake Cortex documentation for LLM functions, especially COMPLETE, and the distinction between generation functions and embedding functions.

  • A. Correct.

    Correct. SNOWFLAKE.CORTEX.COMPLETE is a Cortex LLM function designed to generate text from prompts directly in Snowflake SQL. It can be used in a SELECT statement to produce row-level outputs such as summaries, classifications, or rewrites. This matches the requirement to keep processing inside Snowflake and avoid building a separate application service.

  • B. Incorrect.

    Incorrect. While calling an external API from a stored procedure is technically possible in some architectures, it is not the best fit here and adds unnecessary operational complexity, networking, security, and latency concerns. More importantly, the statement that Cortex LLM functions cannot be invoked from SQL is false; Cortex LLM functions are specifically intended for SQL-based invocation.

  • C. Incorrect.

    Incorrect. AI_EMBED is used to generate embeddings, which are numeric vector representations for semantic search or similarity tasks. Embeddings are not human-readable summaries and should not be treated as text generation output. This distractor reflects a common misconception between embedding functions and text-generation functions.

  • D. Incorrect.

    Incorrect. Cortex LLM functions are not limited to unstructured files. They can operate on text values in SQL expressions, including strings stored in table columns. Exporting data and building an external fine-tuning pipeline is unnecessary for straightforward summarization when a built-in text generation function can be called directly.

Timed practice exam

Take a SnowPro Specialty: Gen AI practice test under exam conditions

55 questions in 85 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam