SnowPro Associate: Platform exam dumps

SnowPro Associate: Platform practice question 328 of 367

SnowPro® Associate: Platform Certification. Associate level, Snowflake. Free question with the correct answer and a full explanation.

SnowPro Associate: Platform Question 328

Single answer● COMPLETE function

A data engineering team wants to let analysts generate short summaries of customer support cases directly in Snowflake SQL. They have enabled Cortex AI features and are testing the SQL COMPLETE function with a prompt built from each case description. During validation, the team notices that the SQL statement returns generated text, but they also need to capture response details such as usage metadata and avoid writing extra application code outside Snowflake. Which approach best meets this requirement?

  1. A

    Call COMPLETE with a supported model and a prompt, then parse the returned VARIANT/JSON response in SQL to extract the generated content and metadata fields.

  2. B

    Replace COMPLETE with COPY INTO because COPY INTO returns generated text together with token usage statistics.

  3. C

    Use COMPLETE only through a Python stored procedure because the SQL function returns plain text and cannot expose structured response data.

  4. D

    Store the prompt in a Snowflake stage first, because COMPLETE can only return metadata when prompts are read from staged files.

Show answer and explanation

Correct answer: A

Explanation

The best answer is to use COMPLETE directly in SQL with a supported model and then process the response in SQL. In Snowflake Cortex, COMPLETE is designed for text generation use cases such as summarization, drafting, and question answering. A practical pattern is to construct prompts from table data and call COMPLETE in a SELECT statement. When teams need more than just the generated text, they can work with the returned structured response rather than exporting the task to external code. This aligns with Snowflake best practices of keeping data processing close to the data and using SQL-native capabilities when possible. Relevant Snowflake documentation covers Cortex COMPLETE usage, supported models, and response handling in SQL.

  • A. Correct.

    Correct. Snowflake Cortex COMPLETE can be used directly in SQL to generate text from a prompt using a supported model. The function can return a structured response that can be handled in SQL, allowing teams to extract generated output and additional response information without moving processing to an external application layer. This is the most direct way to keep the workflow inside Snowflake.

  • B. Incorrect.

    Incorrect. COPY INTO is a data loading/unloading command and has nothing to do with LLM text generation or token usage from Cortex models. This distractor reflects a common misunderstanding that all Snowflake commands producing output can be repurposed for AI inference.

  • C. Incorrect.

    Incorrect. COMPLETE is available in SQL; it is not limited to Python stored procedures. While Python could be used in some architectures, the scenario specifically wants to avoid extra application code outside SQL. The misconception here is assuming structured AI responses require procedural code rather than SQL-based handling.

  • D. Incorrect.

    Incorrect. COMPLETE does not require prompts to be stored in staged files to return response information. Prompts can be passed directly as strings or built from SQL expressions. Stages are used for file storage and loading workflows, not as a prerequisite for COMPLETE response metadata.

Timed practice exam

Take a SnowPro Associate: Platform practice test under exam conditions

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

Start timed exam