What you will be able to do
- Tell from a use case whether it needs the unstructured path (parse, chunk, search) or the structured path (semantic view and Cortex Analyst)
- Choose between AI_PARSE_DOCUMENT modes and AI_EXTRACT for a document workload
- Configure a Cortex Search service's embedding model and explain what hybrid retrieval and semantic reranking contribute
- Pick AI_SIMILARITY, AI_EMBED, AI_MULTI_EMBED, AI_TRANSCRIBE or image input to AI_COMPLETE and AI_CLASSIFY for a multimodal analysis
Key concept
Structured path versus unstructured path — Every Cortex analysis use case starts with one question: is the answer in rows and columns already, or locked inside text, documents, audio or images? Rows and columns go to Cortex Analyst through a semantic view. Everything else is first turned into text or vectors, then searched, extracted or compared.
1.Reading a use case for its data shape
The shape of the data in a scenario decides which Cortex feature fits, more than the business goal does. The general rule is taught in Choosing the Cortex feature: AI Functions vs Cortex Search vs Cortex Analyst vs Cortex Agents. Applying it to a scenario comes down to one thing: find the noun that holds the answer. "Quarterly revenue by region" lives in a table. "What does our warranty policy say about water damage" lives in a PDF.
Structured questions go to Cortex Analyst. It answers questions about structured data in Snowflake by generating SQL against a semantic view. Unstructured questions follow a longer path. You parse the files into text, split that text into chunks, index the chunks with Cortex Search, and let an LLM answer from whatever the search returns. Cortex Search is built for this: its documentation describes it as a RAG engine for chat applications over your text data.
| Signal in the use case | Path | First Cortex step |
|---|---|---|
| Metrics, KPIs, tables, "how many", "by month" | Structured | Semantic view queried by Cortex Analyst |
| PDFs, manuals, contracts, free-text transcripts | Unstructured | AI_PARSE_DOCUMENT, then chunking and Cortex Search |
| Specific fields wanted from many similar documents | Unstructured to structured | AI_EXTRACT into columns, then ordinary SQL |
| Call recordings, photos, scanned images | Multimodal | AI_TRANSCRIBE, or image input to AI functions |
The third row is the one people miss. A stack of invoices looks unstructured, but if the question is "total owed per vendor", the right move is to pull fields out into a table and then aggregate them with SQL. No search index is involved.
Checkpoint 1 of 7· Match them up
Match each use case to the first Cortex step its data shape calls for.
Tap a term, then the definition that fits it.
The noun that holds the answer decides the path. Revenue already sits in tables, so it goes to Cortex Analyst. Policy wording sits in PDFs, so it is parsed and searched. The invoice totals need fields pulled out with AI_EXTRACT and then aggregated, so no search index is involved. Audio has to be transcribed before anything else can work on it.
“AI_EXTRACT is a Cortex AI Function that lets you extract structured information, such as entities, lists, and tables, from text or document files”Source: docs.snowflake.com
2.Parsing whole documents versus extracting fields
For a document Q&A use case, AI_PARSE_DOCUMENT (OCR vs LAYOUT, page_split) is the first step. It reads files from a stage and preserves reading order along with structural elements such as tables and headers. OCR mode gives fast, high-quality text from scanned or text-heavy files. LAYOUT mode is the default recommendation for complex documents, and it is the one to pick when the downstream step needs structure. LAYOUT output comes back as Markdown, so headings survive as # lines that a splitter can cut on.
SELECT AI_PARSE_DOCUMENT (
TO_FILE('@docs.doc_stage','research-paper-example.pdf'),
{'mode': 'LAYOUT' , 'page_split': true}) AS research_paper_example;AI_EXTRACT and responseFormat answers a different question. It doesn't return the whole document. It pulls out structured information (entities, lists and tables) that you name. A finance team that wants invoice number, total and due date from thousands of vendor invoices in mixed layouts should use AI_EXTRACT. The output is a table they can filter, join and sum. To analyse line items across a whole document set, add a grouping column such as Invoice Number to the extracted table. That lets you join results from every document into one table and analyse them with plain SQL.
Checkpoint 2 of 7· Check yourself
A procurement team has 5,000 supplier contracts in mixed layouts on a stage. They want the supplier name, contract value and renewal date for each contract so they can total contract value per supplier in SQL. Which function should they start with?
The team needs specific named fields from many similar documents, loaded into a table they can aggregate. AI_EXTRACT does that. AI_PARSE_DOCUMENT returns the full content, which suits chunking for search but not totals per supplier. AI_CLASSIFY only assigns categories, and AI_SIMILARITY only scores how related two inputs are.
“lets you extract structured information, such as entities, lists, and tables, from text or document files”Source: docs.snowflake.com
Checkpoint 3 of 7· Exam question
A team has a stage full of scanned insurance claim PDFs (image-only, no embedded text layer) and needs the full document content converted into text that preserves reading order and section layout for downstream semantic search. Which function and mode should they use?
Correct answer: A — AI_PARSE_DOCUMENT in LAYOUT mode
- A. AI_PARSE_DOCUMENT in LAYOUT mode is built to convert scanned or digital-native documents into structured, reading-order text while preserving layout such as headings, tables, and sections, which is exactly what downstream chunking and semantic search need.
- B. AI_EXTRACT is designed to pull specific fields into a defined schema rather than produce a full-text, layout-preserving representation of the whole document, so it is not the right first step for general semantic search.
- C. Feeding raw scanned pages directly to a vision model with no dedicated parsing step skips the structured layout extraction and page/table handling that AI_PARSE_DOCUMENT provides, making it a less reliable and less scalable approach.
- D. AI_CLASSIFY assigns categorical labels to documents or pages; it does not convert scanned content into full text and cannot preserve document structure.
Checkpoint 4 of 7· Exam question
A finance team wants to pull the invoice number, total amount, and due date from thousands of vendor invoices in various formats into a structured table with defined columns. Which function is purpose-built for this?
Correct answer: A — AI_EXTRACT
- A. This function performs schema-based structured extraction of named fields such as invoice number, amount, and due date directly from documents, tables, checkboxes, and handwriting, matching the defined output shape the finance team needs.
- B. This function converts documents into rich text or layout-preserving text; it does not natively map content into a user-defined structured schema of specific fields.
- C. This function computes semantic relatedness between two inputs and returns a similarity score; it does not extract structured fields from documents.
- D. This function returns a boolean for filtering rows or text based on a condition; it is not designed to extract structured field values from documents.
3.Chunking, embedding models and reranking in Cortex Search
Retrieval quality depends on what a chunk carries. LAYOUT Markdown fits well with Text splitting helpers (SPLIT_TEXT_RECURSIVE_CHARACTER, SPLIT_TEXT_MARKDOWN_HEADER). If you split on Markdown headers, each chunk stays inside one section and keeps that section's heading. A chunk that reads "Exclusions > Water damage" can be found by a question about flooding. The same sentence cut loose from its heading may not be. Chunk size is a trade-off. Large chunks blur several topics into one vector. Very small chunks lose the context that made the passage answerable.
The chunks then become the source of a Cortex Search service. For a given use case you make two choices: which column to search, and which embedding model turns that column into vectors. The embedding model is used in the vector stage of retrieval. Pricing differs between the hosted models, so a large multilingual corpus and a small English FAQ may justify different choices.
CREATE OR REPLACE CORTEX SEARCH SERVICE transcript_search_service
ON transcript_text
ATTRIBUTES region
WAREHOUSE = cortex_search_wh
TARGET_LAG = '1 day'
EMBEDDING_MODEL = 'snowflake-arctic-embed-l-v2.0'
AS (
SELECT
transcript_text,
region,
agent_id
FROM support_transcripts
);Every query runs through three stages. Vector search finds semantically similar chunks. Keyword search finds lexically similar ones, which matters for part numbers and error codes that embeddings handle poorly. Semantic reranking then reorders the combined candidates so the most relevant ones come first. Reranking doesn't fetch anything new. It only decides which of the retrieved candidates reach the LLM. You can change scoring with numeric boosts, time decays and component weights, or turn reranking off, but the defaults aim for good quality with little tuning.
Checkpoint 5 of 7· Fill the gap
A support team is building a search service over call transcripts. They want a multilingual Arctic embedding model to turn transcript_text into vectors for the vector stage of retrieval. Which parameter in the definition picks that model?
CREATE OR REPLACE CORTEX SEARCH SERVICE transcript_search_service
ON transcript_text
ATTRIBUTES region
WAREHOUSE = cortex_search_wh
TARGET_LAG = '1 day'
? = 'snowflake-arctic-embed-l-v2.0'
AS (
SELECT
transcript_text,
region,
agent_id
FROM support_transcripts
);A Cortex Search service needs two choices: ON names the column to search, and EMBEDDING_MODEL names the hosted model that turns that column into vectors for the vector stage. Pricing differs between the hosted models, so this choice should suit the corpus. AI_EMBED is a separate function, not a parameter of the service.
Source: docs.snowflake.comSources2
4.Similarity scores, audio and images
Some questions need a score, not a passage: "which support tickets are near-duplicates of this one?" AI_SIMILARITY returns the embedding similarity of two inputs directly, so you don't have to manage vectors yourself. When you do want stored vectors, AI_EMBED, the VECTOR type and vector similarity functions cover the mechanics. For this use case, the point is that AI_EMBED also accepts images, and AI_MULTI_EMBED builds embeddings from text, images, audio or video. That makes "find product photos like this one" a similarity query too.
Audio becomes analysable text through AI_TRANSCRIBE. It reads audio and video files from a stage and returns text, timestamps and speaker information, for audio files of up to two hours. The granularity you pick depends on what the analysis needs.
| Granularity | Result | Fits |
|---|---|---|
| Default | Transcription of entire audio file in one piece | Summarising or classifying a whole call |
| Word | Timestamps for each word | Subtitles, click-a-word-to-jump playback |
| Speaker | Who is speaking, with a timestamp at each change | Meetings, interviews, agent-versus-customer analysis |
Images don't need a separate service. AI_COMPLETE takes a text string or an image. AI_CLASSIFY sorts text or images into categories you define, and AI_FILTER returns true or false for an image as well as for text. You pass a staged image with TO_FILE. A damage-photo triage pipeline can therefore classify photos into severity buckets with AI_CLASSIFY and send only the ambiguous ones to AI_COMPLETE for a written description.
Checkpoint 6 of 7· Check yourself
Thousands of vehicle-damage photos sit on a claims stage. The adjusters want each photo sorted into one of three severity buckets (minor, moderate, total loss) so they can route claims with SQL. What is the most direct way to do this?
Images don't need a separate service or a step that turns them into text first. AI_CLASSIFY accepts a staged image through TO_FILE and assigns it to categories you define. OCR would throw away the visual damage, Cortex Search returns passages rather than labels, and AI_SIMILARITY only scores how related two inputs are. It does not put anything into categories.
“AI_CLASSIFY: Classifies text or images into user-defined categories.”Source: docs.snowflake.com
Checkpoint 7 of 7· Exam question
Which Snowflake Cortex function computes a semantic relatedness score between two text inputs by comparing their embedding vectors?
Correct answer: A — AI_SIMILARITY
- A. This function generates embeddings internally for the two supplied inputs and returns a numeric measure of semantic relatedness, which is exactly a similarity score between two text (or image) inputs.
- B. This function assigns one or more predefined category labels to an input rather than producing a pairwise similarity score.
- C. This function pulls structured field values out of unstructured content and does not return a semantic relatedness score.
- D. This function generates free-text or structured completions from an LLM and is not designed to output a similarity score between two inputs.
Sources
(6)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“reliably answering business questions based on your structured data in Snowflake”
↩︎ Reading a use case for its data shape“reliably answering business questions based on your structured data in Snowflake”
↩︎ Key concept - 2.https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-search/cortex-search-overviewOfficial docs
“Use Cortex Search as a RAG engine for chat applications with your text data”
↩︎ Reading a use case for its data shape“Cortex Search allows users to select a hosted embedding model to be leveraged in the vector search stage of retrieval.”
↩︎ Chunking, embedding models and reranking in Cortex Search“Model pricing varies.”
↩︎ Chunking, embedding models and reranking in Cortex Search“Keyword search for retrieving lexically similar documents.”
↩︎ Chunking, embedding models and reranking in Cortex Search“You can customize the scoring of search results by applying numeric boosts, time decays, adjusting component weights, or disabling reranking.”
↩︎ Chunking, embedding models and reranking in Cortex Search“Semantic reranking for reranking the most relevant documents in the result set.”
↩︎ Exam trap 2 - 3.
“preserving reading order and structural elements such as tables and headers”
↩︎ Parsing whole documents versus extracting fields“OCR mode is recommended for fast, high-quality text extraction from scanned or text-heavy documents such as contracts, insurance claims, and manuals.”
↩︎ Parsing whole documents versus extracting fields“AI_PARSE_DOCUMENT returns the content in Markdown format.”
↩︎ Parsing whole documents versus extracting fields“It is optimized for extracting structured content such as tables, headers, and layout relationships, and is required for image extraction.”
↩︎ Prediction - 4.
“extract structured information, such as entities, lists, and tables, from text or document files”
↩︎ Parsing whole documents versus extracting fields“In this way, you can join results from the whole document set in a single table”
↩︎ Parsing whole documents versus extracting fields“AI_EXTRACT is a Cortex AI Function that lets you extract structured information, such as entities, lists, and tables, from text or document files”
↩︎ Checkpoint“lets you extract structured information, such as entities, lists, and tables, from text or document files”
↩︎ Checkpoint - 5.
“AI_SIMILARITY: Calculates the embedding similarity between two inputs.”
↩︎ Similarity scores, audio and images“Creates multimodal embeddings from text, images, audio, or video”
↩︎ Similarity scores, audio and images“AI_CLASSIFY: Classifies text or images into user-defined categories.”
↩︎ Similarity scores, audio and images“Extracts text (using OCR mode) or text with layout information (using LAYOUT mode) from documents in an internal or external stage.”
↩︎ Exam trap 1 - 6.
“processing audio files of up to two hours in length”
↩︎ Similarity scores, audio and images