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

  • Senior Developer Advocate chez Snowflake

 

Photo de l'instructeur

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

Snowflake Cortex

Snowflake Cortex AI

  • Une IA prête pour la production, accessible du bout des doigts
1 Image source: https://www.snowflake.com/en/product/features/cortex/
Introduction à l’IA générative dans Snowflake

Cortex AI

$$

  • Intégration native entre SQL, Python et 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

Interroger les données

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

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

Injection de variable Python

  • Créer une variable Python pour la substitution dans une requête SQL

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

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

Injection de variable Python

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

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écuter summarize dans une cellule SQL

$$

  • Aucun import nécessaire dans les cellules 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...