A Gen AI Specialist has deployed a base model as an LLM in a production environment for a proof of concept. The model is larger and more expensive than other base models.
How can the Specialist lower production costs without affecting performance for the limited tasks needed to support the proof of concept?
In enterprise generative AI architectures, frontier foundation models (such as 70B+ parameter variants) offer strong general reasoning but incur higher credit consumption per token. When supporting a defined, specialized task for a proof of concept, relying on an oversized base model is often cost-inefficient.
Snowflake Cortex Fine-tuning (`SNOWFLAKE.CORTEX.FINETUNE`) allows developers to adapt a smaller, lower-cost foundation model (such as `llama3-8b` or `mistral-7b`) using domain-specific training data. By training on prompt-completion pairs representing the targeted workload, the smaller base model learns the required domain vocabulary, output formats, and task logic.
This specialized model can achieve task performance comparable to larger foundation models while running on a smaller parameter footprint, significantly reducing per-token credit consumption in production.
Cortex Search handles document retrieval rather than adapting model reasoning efficiency; Cortex Agents orchestrate multi-tool reasoning rather than optimizing inference billing; and semantic models support Cortex Analyst text-to-SQL generation rather than general completion cost optimization.
References & Study Guide Topics:
* Snowflake Gen AI Functions: Cortex Fine-Tuning Architecture and Economics
* LLM Optimization: Parameter Sizing, Model Distillation, and Domain Adaptation
===============
A Gen AI Specialist is developing a Gen AI application in Snowflake and must debug a particular record that produced an inaccurate response. The Specialist needs to see, step by step, how the input prompt was processed, what context was retrieved, which tools were called, and how the LLM responded.
Which Snowflake AI observability feature should be used?
Snowflake AI Observability incorporates native telemetry tools---built on OpenTelemetry standards---to provide full runtime visibility across complex Generative AI and agentic pipelines.
When diagnosing compound Gen AI workflows (such as multi-step agent execution, tool-calling sequences, or Retrieval-Augmented Generation retrieval flows), Tracing is the required capability. Tracing records the end-to-end execution path of an individual request as a structured collection of spans within an Event Table. Each trace span captures granular, step-by-step metadata, including:
The raw input prompt and intermediate prompt transformations.
The specific documents, chunks, and similarity scores returned by retrieval engines (e.g., Cortex Search).
External functions or tools invoked by reasoning agents, including input arguments and returned payloads.
The raw completion, token counts, and latency produced by the underlying LLM.
In contrast, Logging captures discrete, point-in-time diagnostic text messages emitted by application code; Metrics aggregate numeric operational counters over time (such as token rates or invocation throughput); and Monitoring provides dashboard-level health alerting rather than step-by-step contextual call graphs.
References & Study Guide Topics:
Snowflake Gen AI Governance: Cortex AI Observability & OpenTelemetry Telemetry Operational Debugging: Distributed Tracing and Span Analysis in Event Tables
===============
Which APIs or functions can be used to query the Snowflake Cortex Search Service? (Choose three)
Snowflake Cortex Search provides dedicated programmatic and SQL interfaces to query the hybrid search index and retrieve the top-k relevant context chunks for RAG architectures:
1. **Snowflake Python APIs:** Using the Snowflake Python SDK or Snowpark client (`snowflake.core. cortex.search_service`), developers can execute search queries directly from Python applications, notebooks, or Streamlit interfaces.
2. **Snowflake REST APIs:** External applications, microservices, and web clients can retrieve search chunks over standard HTTPS endpoints by making authenticated REST calls to the Cortex Search service endpoint.
3. **The SEARCH_PREVIEW function:** In SQL worksheets and stored procedures, developers can test, query, and preview retrieval results directly using the built-in system function `SNOWFLAKE.CORTEX. SEARCH_PREVIEW(...)`.
In contrast, `CORTEX.COMPLETE` executes text generation rather than searching an index;
`EMBED_TEXT_768` computes vector embeddings from input strings; and `CORTEX.SUMMARIZE` produces a condensed textual synopsis. None of these functions query a Cortex Search Service.
References & Study Guide Topics:
* Snowflake Gen AI Functions: Cortex Search Service Retrieval Protocols
* Application Development: Querying Indexes via Python, REST, and `SEARCH_PREVIEW`
===============
A user opened the Snowflake Cortex LLM Playground in the AI & ML Studio within Snowsight, selected gemma-7b from the Standard models drop-down list, and typed "What is Gen AI?" into the dialog box.
Which SQL statement will achieve the same result?
The Cortex LLM Playground in Snowsight provides an interactive graphical interface for experimenting with foundation models available within Snowflake Cortex. When a user selects a model from the Standard models drop-down (such as `gemma-7b`) and enters an input prompt, the underlying web interface executes a completion request.
The SQL programmatic equivalent of this playground interaction is `SNOWFLAKE.CORTEX.COMPLETE`. Its two-argument signature accepts:
1. The target model identifier string (`'gemma-7b'`).
2. The user-supplied input prompt (`'What is Gen AI?'`).
The function passes the prompt to the selected model and returns the generated text completion, matching the behavior of the Playground UI.
The other functions serve different tasks:
* `CLASSIFY_TEXT` assigns text to predefined taxonomy labels.
* `EXTRACT_ANSWER` searches an input document to answer a specific factual question.
* `SUMMARIZE` condenses long text passages into shorter summaries.
None of these alternatives provide open-ended prompt completion against a chosen model. References & Study Guide Topics:
* Snowflake Gen AI Functions: `SNOWFLAKE.CORTEX.COMPLETE` Syntax and Invocation
* Snowsight Tooling: Cortex LLM Playground Mechanics and SQL Equivalents
Which Snowflake Cortex AI observability metrics are used to evaluate LLM-generated responses? (Choose two)
Snowflake Cortex AI Observability provides specialized, automated evaluation metrics designed to systematically assess the quality, safety, and reliability of large language model completions in production and evaluation workflows.
Two core LLM evaluation metrics native to Snowflake Cortex are:
Correctness: Measures factual alignment and semantic fidelity between the LLM-generated output and an established ground-truth response or reference context, identifying factual discrepancies, omissions, or model hallucinations.
Coherence: Evaluates the structural and logical integrity of the generated output, verifying that the text is well-organized, fluent, logically consistent, and free of contradictions or abrupt narrative breaks.
Traditional statistical classification metrics---such as Accuracy, Precision, and F1 Score---are mathematical indicators used to evaluate supervised classification models against rigid true/false categorical labels; they are
not the qualitative, generative assessment metrics implemented in Cortex AI Observability for evaluating unstructured LLM response text.
References & Study Guide Topics:
Snowflake Gen AI Functions: Cortex AI Observability Evaluation Framework
LLM Quality Benchmarking: Qualitative Metrics (Correctness, Coherence, Hallucination Detection)
===============
Currently there are no comments in this discussion, be the first to comment!