Data Bits : First glance at Snowflake's Cortex

Data Bits : First glance at Snowflake's Cortex

What is Cortex?

Cortex is Snowflake's fully managed offering that includes both LLM (Large Language Model) and ML (Machine Learning) functionality. The functionality is integrated into Snowflake so you can utilize the functions against your data within the Snowflake security structure.

Currently, the LLM functions are in Preview but I wanted to sample this functionality to get a feel for it. For more information see here

First use impression

Having recently implemented a small proof-of-concept with a different tool to determine sentiment analysis of emails, I did a quick test of the sentiment function. Since I utilized Snowflake to house the results from the earlier PoC, and still had the data available, I could even compare the results.

Using the function could not be easier. It's as simple as wrapping the function call snowflake.cortex.sentiment() around the data column containing the email body in a SELECT statement. While the test dataset was small there was no apparent impact to execution time.

The results are a range of values from -1 (negative) to 1 (positive). This allows you to implement custom results based on the numeric value. For example, you could decode as follows:

  • -1.0 through -0.65 : Perturbed
  • -0.65 through -0.25 : Irritated
  • -0.25 through 0.25 : Ambivalent
  • 0.25 through 0.65 : Happy
  • 0.65 through 1.0 : Ecstatic


While this is a very straight-forward usage of the function, the simplicity of use, the apparent minimal impact on execution and the tight integration into the Snowflake environment means I'm looking for real-world uses of Cortex!



To view or add a comment, sign in

More articles by Jeff Pell

Explore content categories