QuestionQ86

Snowflake Gen AI & LLM Functions

Which pair of Snowflake Cortex functions should be used together to determine the semantic similarity between documents?

Choose two
  • A COMPLETE
  • B SUMMARIZE
  • C EXTRACT_ANSWER
  • D EMBED_TEXT_V68
  • E VECTOR_L2_DISTANCE
Explanation

Determining semantic similarity between documents in Snowflake Cortex requires two steps: first, converting the document text into numerical vector representations using an embedding function (the EMBED_TEXT family, e.g., EMBED_TEXT_768/EMBED_TEXT_1024), and second, comparing those vectors using a distance or similarity function such as VECTOR_L2_DISTANCE, which computes the Euclidean distance between two vectors—smaller distances indicate greater semantic similarity. COMPLETE generates text completions from a prompt, SUMMARIZE condenses a document into a shorter summary, and EXTRACT_ANSWER pulls a specific answer from a document given a question—none of these measure similarity between two pieces of text.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!