[2024] Snowflake Cortex — EXTRACT_ANSWER function

The function extracts an answer to a given question from a text document. The document may be a plain-English document or a string representation of a semi-structured (JSON) data object.

Syntax

SNOWFLAKE.CORTEX.EXTRACT_ANSWER(source_document, question)

Where:

Source_document is a string that contains the plain text or JSON data which we have to use in order to ask questions

Question is a string that contains the question which is to be answered from the source document.

Function Output

The output of the function is a string that contains the answer to the given question.

Usage

You can use it you ask a prompt based on the input by the user OR you can also use your data which resides inside snowflake table.

I copied the Apple’s Vision Pro hardware configurations from the Wiki page, and search about the storage configuration:

SELECT
SNOWFLAKE.CORTEX.EXTRACT_ANSWER(
$$
Apple Vision Pro comprises approximately 300 components.[40] It has a curved laminated glass display on the front, an aluminum frame on its sides, a flexible cushion on the inside, and a removable, adjustable headband. The frame contains five sensors, six microphones, and 12 cameras. Users see two 3660x3200 pixel[4] 1.41-inch (3.6 cm) micro-OLED displays with a total of 23 megapixels usually running at 90 FPS through the lens but can automatically adjust to 96 or 100 FPS based on the content being shown. The eyes are tracked by a system of LEDs and infrared cameras, which form the basis of the device's iris scanner named Optic ID (used for authentication, like the iPhone's Face ID). Horizontally-mounted motors adjust lenses for individual eye positions to ensure clear and focused images that precisely track eye movements. Sensors such as accelerometers and gyroscopes track facial movements, minimizing discrepancies between the real world and the projected image.[40] Custom optical inserts are supported for users with prescription glasses, which will attach magnetically to the main lens and are developed in partnership with Zeiss. The device's bone conduction speaker is inside the headband and is placed directly over the user's ears. It can also virtualize surround sound.[41][13][40] Two cooling fans about 4 cm (1.6 in) in diameter are placed near the eye positions to help with heat dissipation due to high-speed processing of data. An active noise control function counters distracting noises, including the fan sounds.[40] During the ordering process, users must scan their face using an iPhone or iPad with Face ID for fitting purposes; this can be done via the Apple Store app or at an Apple Store retail location.[42][43]

The Vision Pro uses the Apple M2 system on a chip. It is accompanied by a co-processor known as Apple R1, which is used for real-time sensor input processing. The device can be purchased with three internal storage configurations: 256 GB, 512 GB, and 1 TB.[36] It can be powered by an external power supply, a USB-C port on a Mac, or a battery pack rated for two and a half hours of use.[44][12] The battery pack connects to the headset using an unremovable 12-pin locking variant of the Lightning connector.[45]

The user's face is scanned by the headset during setup to generate a persona—a realistic avatar used by OS features.[46] One such feature is "EyeSight", an outward-facing display which displays the eyes of the user's persona. Its eyes appear dimmed when in AR and obscured when in full immersion to indicate the user's environmental awareness. When someone else approaches or speaks, even if the user is fully immersed, EyeSight shows their persona's virtual eyes normally and makes the other person visible.[44][47]

A digital crown dial on the headset is used to control the amount of virtual background occupying the user's field of view, ranging from a mixed-reality view where apps and media appear to float in the user's real-world surroundings, to completely hiding the user's surroundings.[48][44]
$$,


'What is the storage configuration of the product?'
)

About Me:

Hi there! I am Divyansh Saxena

I am an experienced Cloud Data Engineer with a proven track record of success in Snowflake Data Cloud technology. Highly skilled in designing, implementing, and maintaining data pipelines, ETL workflows, and data warehousing solutions. Possessing advanced knowledge of Snowflake’s features and functionality, I am a Snowflake Data Superhero & Snowflake Snowpro Core SME. With a major career in Snowflake Data Cloud, I have a deep understanding of cloud-native data architecture and can leverage it to deliver high-performing, scalable, and secure data solutions.

Follow me on Medium for regular updates on Snowflake Best Practices and other trending topics:

Also, I am open to connecting all data enthusiasts across the globe on LinkedIn:

https://www.linkedin.com/in/divyanshsaxena/

--

--