QuestionQ83

Snowflake Gen AI & LLM Functions

A Gen AI Specialist is using Snowflake Cortex Analyst to generate natural language responses from product sales data. Occasionally, the LLM makes up metrics that do not exist in the data set.

How should this be addressed?

  • A Use a WHERE clause in the SQL prompt
  • B Ensure the model has been verified_at within the last 30 days.
  • C Add a VERIFIED_QUERIES section to the semantic model.
  • D Train the Cortex LLM model with additional sample outputs using fine-tuning commands.
Explanation

Cortex Analyst semantic models support a VERIFIED_QUERIES section, which stores validated question-to-SQL pairs. Cortex Analyst uses these verified queries to ground its natural language understanding in confirmed, accurate business logic and metric definitions, extracting patterns (such as precise filters and metric definitions) and applying them to similar future queries. This retrieval-augmented approach anchors the LLM's output to metrics and logic that actually exist in the semantic model, substantially reducing the chance that it fabricates nonexistent metrics. Adding a WHERE clause only restricts returned rows and does not prevent hallucinated metric names; verification timestamps are unrelated to hallucination prevention; and Cortex Analyst does not support fine-tuning the underlying LLM with custom training commands.

Learn more

Community Discussion

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