SnowPro Specialty: Gen AI Question 154
Single answerCortex Analyst Verified Query Repository (VQR)A retail analytics team uses Cortex Analyst to let business users ask questions in natural language about sales performance. They notice that for the prompt, "Which product category had the highest year-over-year revenue growth in EMEA last quarter?", Analyst sometimes generates a SQL pattern that compares the wrong date ranges when similar phrasing is used. The team wants to improve reliability for this high-value business question without hard-coding every variation in the application. Which action is the best approach?
- A
Add a verified question-SQL pair for this business question to the Verified Query Repository (VQR) so Cortex Analyst can use the approved query pattern for matching requests.
- B
Increase the size of the virtual warehouse used by the application so Cortex Analyst has more compute available to generate the correct SQL consistently.
- C
Replace Cortex Analyst with a generic LLM completion endpoint and store the correct answer text in a prompt template.
- D
Create a materialized view for EMEA revenue and remove the semantic model, because VQR only works when no semantic model is present.
Show answer and explanation
Correct answer: A
Explanation
The best answer is to use the Verified Query Repository for a business-critical prompt that must consistently resolve to approved SQL logic. In practice, VQR is appropriate when teams identify recurring, high-value questions where generated SQL needs stronger guidance or validation. This approach preserves the Cortex Analyst workflow while improving trust and repeatability. By contrast, changing warehouse size addresses performance, not interpretation quality; replacing Analyst with a generic LLM sacrifices governed analytics patterns; and removing the semantic model is contrary to how Analyst is intended to be used. Snowflake guidance for Cortex Analyst emphasizes strong semantic modeling and the use of verified queries to improve reliability for important natural-language questions.
- A. Correct.
Correct. The Verified Query Repository (VQR) is designed to improve reliability for important or frequently asked natural-language questions by associating a vetted question with an approved SQL query. When a user asks the same or a closely matching question, Cortex Analyst can leverage that verified query instead of relying only on generated SQL. This is the practical way to handle known high-value prompts that need consistent, trusted behavior.
- B. Incorrect.
Incorrect. Warehouse size affects query execution resources, not the semantic correctness of how Cortex Analyst interprets a business question or chooses date-comparison logic. More compute may speed execution, but it does not solve the underlying issue of inconsistent SQL generation for a specific natural-language pattern.
- C. Incorrect.
Incorrect. Replacing Cortex Analyst with a generic LLM completion workflow removes the structured benefits of Analyst, including semantic understanding over governed data models and support for verified query handling. Storing answer text in a prompt template is also brittle because the requested answer depends on current data and should be computed from SQL, not hard-coded as static text.
- D. Incorrect.
Incorrect. A materialized view may help performance for some workloads, but it does not address the need to reliably map a natural-language business question to the intended SQL logic. The claim that VQR only works when no semantic model is present is false; Cortex Analyst relies on the semantic model context, and VQR is used to reinforce trusted question-to-SQL behavior rather than replace semantic modeling.