SnowPro Specialty: Gen AI Question 10
Single answerCortex AnalystA retail analytics team is building a natural-language analytics experience for business users. They want users to ask questions such as "What were online sales in the Northeast last quarter by product category?" and have Cortex Analyst generate accurate SQL against governed Snowflake data. The team has a semantic model file, but early testing shows that Analyst sometimes chooses the wrong revenue field because the model contains both GROSS_SALES and NET_SALES with similar descriptions. Which action is the best way to improve the reliability of Cortex Analyst's generated SQL without giving users direct SQL access?
- A
Refine the semantic model by giving clearer business definitions, metrics, and field descriptions so Cortex Analyst can map user terms to the intended data objects.
- B
Grant business users broader privileges on the underlying tables so Cortex Analyst can inspect more raw data at runtime and infer the correct measure.
- C
Replace Cortex Analyst with Cortex Search because search indexes are designed to resolve ambiguous metric definitions in structured analytics queries.
- D
Move the semantic model logic into a Python stored procedure so Analyst does not need metadata about metrics and dimensions.
Show answer and explanation
Correct answer: A
Explanation
The best answer is to improve the semantic model. Cortex Analyst is built for natural-language querying over structured enterprise data using a semantic layer that defines metrics, dimensions, relationships, and business meaning. When generated SQL is unreliable, especially because of ambiguous or overlapping fields, the highest-value correction is to make the semantic model more explicit and business-friendly. This aligns with Snowflake best practices for governed analytics: define clear metric semantics, reduce ambiguity, and let Analyst generate SQL against approved data objects instead of expanding raw access. In Snowflake documentation for Cortex Analyst, the semantic model is the core artifact that helps the service map natural language to the correct SQL representation. Therefore, refining that model is the most effective and secure remediation.
- A. Correct.
Correct. Cortex Analyst relies on the semantic model to understand business concepts, metrics, dimensions, relationships, and synonyms when translating natural language into SQL. If two fields such as GROSS_SALES and NET_SALES are ambiguously described, the most effective fix is to improve the semantic model with precise names, descriptions, and business definitions. This is the practical governance-first approach for improving SQL generation accuracy.
- B. Incorrect.
Incorrect. Cortex Analyst does not become more accurate simply because end users have broader direct access to base tables. Expanding privileges can weaken governance and does not address the root cause: ambiguity in the semantic model. Best practice is to keep access controlled and improve the semantic layer rather than expose raw tables unnecessarily.
- C. Incorrect.
Incorrect. Cortex Search is intended for retrieval over indexed content, not for generating governed analytical SQL from a semantic model. It is not a replacement for Cortex Analyst in BI-style natural language analytics scenarios. A candidate might choose this option by confusing retrieval use cases with text-to-SQL analytics use cases.
- D. Incorrect.
Incorrect. Moving logic to a Python stored procedure does not solve Analyst's need for well-defined semantic metadata. Cortex Analyst is designed to use a semantic model to interpret user intent and generate SQL. Procedural logic may be useful elsewhere, but it is not the primary mechanism for disambiguating business metrics in Analyst.