Introduction à Snowflake Cortex et aux notebooks

Introduction à l'IA générative dans Snowflake

James Cha-Earley

Senior Developer Advocate, Snowflake

Faites connaissance avec votre instructeur !

 

$$

James Cha-Earley

  • Promoteur principal auprès des développeurs chez Snowflake

 

Photo de l'instructeur

Introduction à l'IA générative dans Snowflake

Snowflake Cortex

Snowflake Cortex AI

  • IA prête pour la production à portée de main
1 Image source: https://www.snowflake.com/en/product/features/cortex/
Introduction à l'IA générative dans Snowflake

Cortex AI

$$

  • Intégration native avec SQL, Python et les notebooks

$$

  • De l'expérimentation à la production dans Snowflake

$$

  • Gouvernance, politiques et observabilité intégrées

Icône du logo Snowflake

Introduction à l'IA générative dans Snowflake

Données du cours

Requête des données du cours affichant les 10 premières lignes : date, rating, description, hotel_name, city, country et language

Introduction à l'IA générative dans Snowflake

Code modèle

Notebook avec du code modèle Python et SQL

Introduction à l'IA générative dans Snowflake

Interroger les données

Description des données du cours détaillant les colonnes : date, rating, description, hotel_name, city, country et language ; et les types de données

Introduction à l'IA générative dans Snowflake

Injection de variables Python

  • Créer une variable Python à substituer dans une requête SQL

Création d'une variable Python nommée target_location, avec la valeur Cancun

Introduction à l'IA générative dans Snowflake

Injection de variables Python

Injection d'une variable Python dans une requête SQL

Introduction à l'IA générative dans Snowflake

Configurer Cortex

Configuration de Cortex

Introduction à l'IA générative dans Snowflake

Résumer un texte

from snowflake.cortex import summarize

review = """ I was very impressed with this hotel, especially the service. They make you feel special and you feel like everything is possible. Special shout out to the Kidz Club staff. Our daughter is very picky and for the first time, she begged to go back there. They have a great supervision and they let the kids do fun activities such as cooking classes and crafting. The food was really good (buffet offered a different choice everyday). The all-inclusive program is really worth the price, and the beach was beautiful! """
Introduction à l'IA générative dans Snowflake

Résumer un texte

result = summarize(text=review)

print(result)

$$

The hotel delivered excellent service with outstanding Kidz Club staff who engaged 
even picky children through supervised activities. The daily buffet offered good
variety, and the all-inclusive program plus beautiful beach provided great value.
Introduction à l'IA générative dans Snowflake

Cortex dans les cellules SQL

Exécution de summarize dans la cellule SQL

$$

  • Aucun import requis en cellule SQL

$$

  • Utilisez des cellules Python pour enchaîner plusieurs fonctions
Introduction à l'IA générative dans Snowflake

Passons à la pratique !

Introduction à l'IA générative dans Snowflake

Preparing Video For Download...