SnowPro Specialty: Gen AI Question 61
Single answerCortex AnalystA retail company is building a natural-language analytics assistant for business users. They want to use Cortex Analyst so users can ask questions like "What were online sales in the Northeast last quarter?" The source data is spread across several Snowflake tables with business-specific naming conventions, and the team has noticed that similar questions sometimes generate inconsistent SQL. Which approach would most directly improve the quality and consistency of Cortex Analyst responses while keeping the solution aligned with recommended implementation practices?
- A
Create a semantic model that defines the relevant logical tables, relationships, metrics, dimensions, and business-friendly synonyms for the data used by Cortex Analyst.
- B
Increase the size of the virtual warehouse used by the underlying tables so Cortex Analyst has more compute available when interpreting user questions.
- C
Convert all structured sales tables into a single VARIANT column so Cortex Analyst can infer the schema dynamically from semi-structured data.
- D
Replace Cortex Analyst with a generic large language model prompt that includes raw table DDL and sample SQL queries in every request.
Show answer and explanation
Correct answer: A
Explanation
The best answer is to create a semantic model for Cortex Analyst. In real implementations, the main challenge in natural-language analytics is not just generating SQL, but generating the right SQL consistently against governed business definitions. Cortex Analyst is built for this use case: it relies on semantic context so it can interpret business terms, map synonyms, understand relationships between datasets, and generate trustworthy queries. This aligns with Snowflake guidance to provide a semantic model describing metrics, dimensions, and relationships for Analyst rather than relying on raw schema inference or prompt engineering alone. Increasing warehouse size addresses performance, not interpretation quality. Reshaping structured data into VARIANT introduces unnecessary complexity. Using a generic LLM with DDL in prompts bypasses the governance and repeatability benefits that Cortex Analyst is designed to provide.
- A. Correct.
Correct. Cortex Analyst is designed to use a semantic model to map business language to trusted analytics concepts. Defining logical tables, joins/relationships, metrics, dimensions, and synonyms gives the service the context it needs to translate natural-language questions into more accurate and consistent SQL. This is especially important when source systems use technical or inconsistent naming conventions.
- B. Incorrect.
Incorrect. Warehouse size can affect query execution performance after SQL is generated, but it does not directly improve how Cortex Analyst interprets user intent or resolves business terminology. The problem described is semantic ambiguity and inconsistency, not insufficient compute for query execution.
- C. Incorrect.
Incorrect. Converting structured relational data into a single VARIANT column would generally make analytics harder, not easier. Cortex Analyst works best when it can rely on a well-defined semantic layer over structured analytical data. Flattening everything into semi-structured storage would reduce clarity and likely harm SQL generation quality.
- D. Incorrect.
Incorrect. A generic LLM prompt with raw DDL and examples may work in ad hoc prototypes, but it is not the recommended approach for governed, production-grade natural-language analytics in Snowflake. Cortex Analyst is intended to use a semantic model so that business definitions, relationships, and metrics are standardized rather than repeatedly inferred from prompt text.