A Snowflake Cortex LLM function is a Snowflake-hosted function that invokes managed large language model capabilities from SQL. It can augment stored data with generated or interpreted outputs, such as sentiment scores, summaries, translations, embeddings, extracted answers, and completions. section 7.0 section 7.3
Common functions include:
- COMPLETE returns a response that completes a prompt. section 7.3
- EMBED_TEXT_768 returns a vector embedding for text. section 7.3
- EXTRACT_ANSWER derives an answer from unstructured data; SUMMARIZE, TRANSLATE, and SENTIMENT provide specialized text operations. section 7.3
Classify customer reviews
Grant the required Cortex privilege, select the target database and schema, then apply SENTIMENT to each review. The function returns a floating-point score from −1 to 1; a CASE expression can map score ranges to Negative, Neutral, or Positive labels. section 7.3
