Daanalytics

Snowflake BUILD Amsterdam – Cortex Analyst Hands-On Lab

Snowflake BUILD Amsterdam - Cortex Analyst Hands-On Lab

Last Wednesday I had the privilege to organize and give a Snowflake BUILD Hands-On Lab. Snowflake BUILD is Snowflake’s yearly event for Developers, Data Scientists, Data Engineers, and all Data Professionals full “of exclusive product announcements, “how to” technical sessions, and hands-on labs focused on Snowflake’s latest innovations. Learn how to build data pipelines, models and apps in the age of generative AI and LLMs.”

Last year’s biggest announcements:

Thanks for reading DaAnalytics! Subscribe for free to receive new posts and support my work.

  • Snowflake Intelligence“…. a groundbreaking platform that will empower business users to create data agents, so they can analyze, summarize, and take action from their enterprise data.“ Check out Sri and Dash’s live demo here
  • Snowflake Unistore – powered by Hybrid Tables, is now Generally Available
  • Snowflake Open Catalog – A managed version of the open source Apache Polaris (Incubating). It uses the Apache Iceberg™ REST protocol to integrate external data engines.
  • Snowflake Cortex AI“Quickly analyze data and build generative AI applications using fully managed LLMs, vector search and fully managed text-to-SQL services. Enable multiple users to use AI models with no-code, SQL and Python interfaces.“
  • Snowflake Native App Framework, including integration with Snowpark Container Services is presented here.

Snowflake Cortex AI

Snowflake Cortex AIis a suite of AI features that use large language models (LLMs) to understand unstructured data, answer freeform questions, and provide intelligent assistance.”

Snowflake Cortex AI
PR: Private Preview | PU: Public Preview

Snowflake Cortex AI offers semantic management and retrieval of data. It includes models for serverless inference of pre-trained and custom LLMs. All of this on top of structured and unstructured data, Data Governance and data processing.

Snowflake Cortex Analyst

Cortex Analyst is a fully managed service providing a conversational interface for interacting with structured data in Snowflake.

Build a conversational layer within a set of tables

Cortex Analyst is a service within the Cortex AI suite that makes it easy to build a conversational layer within a well scoped set of tables

  • Cortex Analyst uses Meta’s Llama and Mistral models. It is a fully managed service that provides a conversational interface to interact with structured data in Snowflake
  • Conversational, self-service analytics

Cortex Analyst empowers all users to perform ad-hoc data analytics without writing SQL.

The process consists of 4 elements:

  1. Request – a client application submits user questions and a Semantic Model YAML to Cortex Analyst REST API.
  2. Question understanding and enrichment – a classification agent determines if question can be answered. If no, suggestions of similar questions are returned. If yes, question is enhanced by two additional agents. Read this ‘Behind the Scenes’ to understand more.
  3. SQL generation & error correction – Multiple SQL generation agents run in parallel. For each, the error correction agent checks and corrects SQL. Results are passed to synthesizer agent produces the best SQL query.
  4. Display response – SQL query and the interpretation of the user question are returned as the API response. This query can be executed or further processed, with the final results presented to the end user.

Snowflake Cortex Analyst In Action

  1. Cortex Analyst is integrated into a Streamlit application via a REST API.
  2. A semantic model, describing the underlying schemas and business specific terminology has been provided to generate most accurate responses.

Conclusion and Resources

During the Hands-On Lab we were able to show how Cortex Analyst allows “business users to ask natural-language questions over their structured data to perform analysis and receive trusted answers to business questions.”

We showed;

  • How to create a semantic model YAML file. Check out the Semantic Model Generator on Github.
  • How to interact with the Cortex Analyst REST API via a Streamlit in Snowflake (SiS) chat interface.

There are more resources to continue your journey.

For more information, check out the resources below:

Till next time.

Snowflake Data Superhero and Chapter Lead for the Dutch Snowflake ❄️ User Group. Online also known as; DaAnalytics.

Daan Bakboord

DaAnalytics Snowflake Data Superhero Footer

Bekijk ook:

Snowflake BUILD Amsterdam – Cortex Analyst Hands-On Lab

Last Wednesday I had the privilege to organize and give a Snowflake BUILD Hands-On Lab. Snowflake BUILD is Snowflake’s yearly event for Developers, Data Scientists, Data Engineers, and all Data Professionals full “of exclusive product announcements, “how to” technical sessions, and hands-on labs focused on Snowflake’s latest innovations. Learn how to build data pipelines, models and apps in the age of generative AI and LLMs.”

Lees verder »
Why didn't we see this coming?

Why didn’t we see this coming?

Early this month I attended the two days International Master Class in Strategic Intelligence executed by Rodenberg Tillman & Associates. If you’re really determined to move beyond simply gathering data and truly understand its strategic impact, this Master Class is designed for you. The Master Class is built around the Six Building Blocks™, ensuring comprehensive coverage of the critical aspects of Strategic Management and Intelligence. It’s perfect for business professionals who aim to excel by integrating Strategic Intelligence into their everyday practices, gaining the insights necessary to not only anticipate, but shape the future.

Lees verder »
Amsterdam User Group Meeting October 2024

Snowflake Dutch User Group – October 2024

Last night I had the privilege to organize a Snowflake ❄️ User Group in Snowflake’s Amsterdam Office.

Johan van der Kooij shared his experiences regarding optimizing Snowflake from a cost & performance perspective. He shared practical hints, as well as example queries, that you can use to optimize your Snowflake environment.

Lees verder »