SnowPro Associate: Platform Question 315
Single answer3.5 Explain how to use Snowflake Cortex LLM functions.A data engineering team stores customer support cases in a Snowflake table named SUPPORT_TICKETS with columns TICKET_ID, ISSUE_TEXT, and CREATED_AT. Analysts want to generate a short summary of each issue directly in SQL without moving data out of Snowflake. The team also wants to minimize operational overhead and use a built-in large language model capability. Which approach best meets these requirements?
- A
Use a Snowflake Cortex LLM SQL function such as SNOWFLAKE.CORTEX.SUMMARIZE on ISSUE_TEXT in a SELECT statement.
- B
Export ISSUE_TEXT to an external Python service, call a third-party LLM API, and write the summaries back into Snowflake.
- C
Create a materialized view with a regular expression that extracts the first sentence of ISSUE_TEXT as the summary.
- D
Use a user-defined table function that calls staged Java code, because Snowflake SQL cannot invoke built-in LLM capabilities directly.
Show answer and explanation
Correct answer: A
Explanation
The best answer is to use a Snowflake Cortex LLM function directly in SQL. Snowflake Cortex includes built-in AI functions for tasks such as summarization and completion-style generation, allowing teams to analyze text where the data already resides. This aligns with Snowflake best practices of minimizing data movement and simplifying architecture. In this scenario, using SNOWFLAKE.CORTEX.SUMMARIZE on the ISSUE_TEXT column is the most practical and platform-native solution. The distractors reflect common misconceptions: that external APIs are required for LLM use, that simple text processing is equivalent to summarization, or that custom code is necessary to access AI capabilities. Snowflake documentation on Cortex AI SQL functions describes invoking these capabilities directly from SQL for in-platform text processing use cases.
- A. Correct.
Correct. Snowflake Cortex provides built-in LLM functions that can be called directly from SQL on data stored in Snowflake. For a summarization use case, a function such as SNOWFLAKE.CORTEX.SUMMARIZE is the most direct fit because it keeps data in Snowflake, reduces integration overhead, and lets analysts generate summaries in SQL.
- B. Incorrect.
Incorrect. While exporting data to an external service could produce summaries, it does not meet the requirement to minimize operational overhead or use Snowflake's built-in LLM capabilities. It also introduces additional data movement, security considerations, and external dependency management.
- C. Incorrect.
Incorrect. A regular expression does not perform true semantic summarization. Extracting the first sentence is a common misconception because it may look like a summary in some cases, but it does not use an LLM and will often fail to capture the key issue accurately.
- D. Incorrect.
Incorrect. Snowflake SQL can invoke built-in Cortex LLM functions directly, so a custom Java-based table function is unnecessary for this scenario. This option adds complexity rather than reducing it and misunderstands how Cortex functions are used.