COF-C03 Question 128
Single answerAI SQL functionsA data engineering team stores customer support tickets in a Snowflake table named SUPPORT_TICKETS with columns TICKET_ID, LANGUAGE, and MESSAGE_TEXT. They want to build a quick SQL-only solution that helps English-speaking analysts review non-English tickets without moving data out of Snowflake. The analysts need each ticket translated into English directly in a query result set. Which Snowflake AI SQL function is the most appropriate choice?
- A
Use AI_TRANSLATE(MESSAGE_TEXT, LANGUAGE, 'en') in the SELECT statement.
- B
Use AI_COMPLETE(MESSAGE_TEXT, 'Translate this ticket to English') in the SELECT statement.
- C
Use AI_EMBED(MESSAGE_TEXT) and then decode the vector as English text in the query.
- D
Use AI_CLASSIFY(MESSAGE_TEXT, ['English','Non-English']) and display the predicted class as the translation.
Show answer and explanation
Correct answer: A
Explanation
The best answer is AI_TRANSLATE because the requirement is straightforward translation of existing text into English within a SQL query, without exporting data. Snowflake AI SQL functions are task-oriented, and translation should use the dedicated translation function rather than a more generic function like AI_COMPLETE. AI_COMPLETE may sometimes achieve a translation-like result through prompting, but for exam and production best-practice purposes, candidates should choose the specialized function when one exists. AI_EMBED is for creating vector representations, not translated output, and AI_CLASSIFY is for categorization rather than text conversion. This aligns with Snowflake guidance to use the AI SQL function that directly matches the business task.
- A. Correct.
Correct. AI_TRANSLATE is designed for translation tasks and is the most appropriate AI SQL function when the requirement is to convert text from one language to another directly in SQL. In this scenario, it fits the need for translating ticket text into English for analyst review while keeping processing inside Snowflake.
- B. Incorrect.
Incorrect. AI_COMPLETE is intended for prompt-based text generation and completion use cases. Although a completion model might be able to translate text with a carefully written prompt, it is not the most appropriate or purpose-built choice when a dedicated translation function exists. This option reflects a common misconception that a general-purpose LLM function should be used for every language task.
- C. Incorrect.
Incorrect. AI_EMBED generates vector embeddings that capture semantic meaning for similarity search, retrieval, and other vector-based workflows. Embeddings are not reversible into translated human-readable text. This distractor targets the misconception that embeddings can be decoded back into a useful textual transformation.
- D. Incorrect.
Incorrect. AI_CLASSIFY assigns text into one of a set of categories. It can help identify whether text is English or non-English, but it does not produce a translated version of the ticket. This option confuses language detection or categorization with translation.