Comprehensive and Detailed 150 to 250 words of Explanation From [SnowPro® Specialty: Gen AI/Course Guide/topics]:
Extracting multiple target attributes from unstructured textual data and projecting them into discrete relational columns can be achieved in Snowflake Cortex through two validated architectural approaches:
1. **Structured Outputs via JSON Schema (`COMPLETE`):** Invoking `SNOWFLAKE.CORTEX.COMPLETE` while supplying a JSON schema inside the `response_format` configuration parameter forces the LLM to emit a valid, schema-compliant JSON object containing the three requested keys. Developers can parse the output VARIANT using standard Snowflake colon/dot notation (e.g., `response:field1::VARCHAR`) to project the elements into three separate table columns in a single inference call.
2. **Targeted Question-Answering Extraction (`EXTRACT_ANSWER`):** The task-specific function `SNOWFLAKE.CORTEX.EXTRACT_ANSWER(source_text, question)` returns a single string directly extracted from the source passage. By executing this function three times within the `SELECT` projection—each with a question targeting one specific attribute—each new column is directly populated with its corresponding scalar value.
Option B is invalid because `CHOICES` is not a top-level JSON key parsed via `top_p` in standard Cortex SQL outputs. Option C is incorrect because `ENTITY_SENTIMENT` evaluates aspect sentiment rather than extracting arbitrary business attributes. Option D is incorrect because `EXTRACT_ANSWER` returns a plain VARCHAR string, not a composite semi-structured object navigable by dot notation.
References & Study Guide Topics:
* Snowflake Gen AI Functions: Structured Information Extraction Patterns
* Function Syntax: `SNOWFLAKE.CORTEX.COMPLETE` with `response_format` vs. `EXTRACT_ANSWER`
===============
Submit