QuestionQ55

Snowflake Gen AI & LLM Functions

Which strategy should be used to reduce latency when using the SNOWFLAKE.CORTEX.COMPLETE function?

  • A Use the REST API when invoking inferences
  • B Use the SQL API when using a Snowpark session object
  • C Set the temperature parameter close to 1.
  • D Pass a JSON schema to the response_format parameter
Explanation

The Cortex REST API is designed for direct model-inference requests, avoiding the additional SQL query-execution path that is used when invoking the function through SQL or a Snowpark session. Temperature changes output randomness, while response_format constrains the output to a JSON schema; neither is a latency optimization.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!