Snowflake Cortex LLM Functions Explained (with Examples)

Explaining CORTEX LLM functions with simple examples.

Dhilip Subramanian
8 min readMar 29, 2024
Image generated by AI (Microsoft Designer)

I have been exploring Snowflake Cortex LLM functions, which were recently released. These functions provide us with instant access to leading LLM models from Mistral, Meta, and Google. The best part is that these LLMs are fully hosted and managed by Snowflake, providing performance, scalability, and governance. The data resides inside Snowflake, eliminating the need for any third-party tools, and it is easily accessible via SQL and Python.

In this blog post, I am explaining Snowflake Cortex functions with examples using SQL functions. The available Cortex functions are COMPLETE SENTIMENT EXTRACT_ANSWER SUMMARIZE TRANSLATE

For demonstration purposes, I have utilized the Amazon UK shoes product reviews dataset, which I loaded into Snowflake under the table called REVIEWS in the database AIPROJECT and schema dbo.

The dataset includes PRODUCT_NAME, REVIEW_TITLE, REVIEW_TEXT, and REVIEW_DATE.

Image by Author

TRANSLATE

--

--