SnowPro Specialty: Gen AI Question 242
Single answerCOMPLETE argumentsA data engineering team uses Snowflake Cortex COMPLETE in a SQL pipeline to generate short product summaries from item descriptions. The summaries must be concise, deterministic across repeated runs, and returned as plain text so downstream SQL transformations can parse them easily. The team also wants to prevent unusually long responses that could increase cost and break a VARCHAR(200) target column. Which COMPLETE configuration best meets these requirements?
- A
Set temperature to 0 or near 0, specify a low max_tokens value, and keep the prompt requesting plain text output.
- B
Set temperature to a high value such as 1.5, increase max_tokens substantially, and rely on the model to stay concise because the prompt says "short summary."
- C
Omit max_tokens and set temperature to 0.7 because a moderate temperature improves consistency while allowing the model to self-limit its output length.
- D
Set top_p to 0 and omit temperature so the model becomes fully deterministic and guaranteed to stay within the VARCHAR(200) column limit.
Show answer and explanation
Correct answer: A
Explanation
In Snowflake Cortex COMPLETE, argument selection should match operational goals. For repeatable SQL-based generation tasks, lower temperature is the primary control for reducing randomness and improving consistency. max_tokens is the practical safeguard for bounding response length and cost, especially when writing into fixed-width columns or downstream systems with size limits. Prompting for plain text is also important when later SQL logic expects simple text rather than verbose or structured output. Best practice is to combine clear prompting with explicit generation parameters rather than relying on the model to infer length or format constraints. This aligns with Snowflake Cortex COMPLETE usage guidance around generation controls such as temperature and max_tokens.
- A. Correct.
Correct. For Snowflake Cortex COMPLETE, temperature controls randomness; using 0 or near 0 is the standard way to make outputs more deterministic for repeatable batch pipelines. Setting max_tokens explicitly helps cap response length and cost. If downstream SQL expects plain text, the prompt should instruct the model to return plain text rather than structured or verbose output.
- B. Incorrect.
Incorrect. A high temperature increases variability and makes repeated runs less consistent, which conflicts with the requirement for deterministic summaries. Increasing max_tokens also makes long outputs more likely and can increase cost. Prompting for a short summary alone is weaker than combining prompt instructions with a generation limit.
- C. Incorrect.
Incorrect. A moderate temperature such as 0.7 generally increases variation compared with 0, so it does not best support deterministic batch processing. Omitting max_tokens removes a direct control over output length, which is risky when the result must fit within a constrained target column.
- D. Incorrect.
Incorrect. top_p is a sampling control, but setting it to 0 is not the right way to guarantee deterministic behavior or output length. More importantly, omitting max_tokens means there is no direct bound on response size. The misconception is treating sampling settings as a substitute for explicit output-length control.