Translation

Introduction to Generative AI in Snowflake

James Cha-Earley

Senior Developer Advocate, Snowflake

Why translate?

Query of course data showing top 3  review languages

  • Executive Resorts receives thousands of reviews in multiple languages
Introduction to Generative AI in Snowflake

Translating with Cortex

from snowflake.cortex import translate

translated_review = translate( text="El hotel fue excelente. Muy limpio y cómodo.",
from_language="es",
to_language="en"
)
Introduction to Generative AI in Snowflake

Translated review

print(translated_review)
The hotel was excellent. Very clean and comfortable.
Chinese zh Dutch nl English en
French fr German de Hindi hi
Italian it Japanese ja Korean ko
Polish pl Portuguese pt Russian ru
Spanish es Swedish sv
1 https://docs.snowflake.com/en/sql-reference/functions/translate-snowflake-cortex
Introduction to Generative AI in Snowflake

Translations from the database

Snowflake Notebook containing a SQL query returning a single Spanish review and a translation into English

Introduction to Generative AI in Snowflake

Translation

Print statements containing the original Spanish text and the translated review

Introduction to Generative AI in Snowflake

A word of caution

Original (Spanish):

"Nos trataron como reyes."

AI Translation:

"They treated us like kings."

Polished Version:

"They treated us like royalty."

$$

Original (French):

"Le service laisse à désirer."

AI Translation:

"The service leaves to be desired."

Polished Version:

"The service was disappointing."

Introduction to Generative AI in Snowflake

Quality assurance

$$

$$

$$

  • Require human reviews based on specific criteria ✅

$$

Quaity assurance for reviews including human reviews

Introduction to Generative AI in Snowflake

Let's practice!

Introduction to Generative AI in Snowflake

Preparing Video For Download...