Tag: Large Language Models

Send results to a language model (DP-800 Exam Prep)

This post is a part of the DP-800: Developing AI-Enabled Database Solutions Exam Prep Hub.
This topic falls under these sections:
Implement AI capabilities in database solutions (25–30%)
   --> Design and implement retrieval-augmented generation (RAG)
      --> Send results to a language model


Note that there are 10 practice questions (with answers) at the end of each section to help you solidify your knowledge of the material. Also, there are 4 practice tests with 30 questions each available from the hub's main page below the exam topics section.

Introduction

One of the final steps in a Retrieval-Augmented Generation (RAG) workflow is sending retrieved data to a Large Language Model (LLM). After retrieving relevant information from a SQL database, vector index, or hybrid search system, the application packages the data into a prompt and submits it to an AI model through a REST API. The quality of this process directly affects the accuracy, relevance, security, and efficiency of the generated response.

For the DP-800 exam, you should understand how to prepare retrieved results for language model processing, construct effective prompts, submit requests to AI services, handle responses, and follow best practices for security, performance, and reliability.


Where This Step Fits in a RAG Workflow

A Retrieval-Augmented Generation solution consists of several stages.

User Question
Generate Query Embedding
Vector or Hybrid Search
Retrieve Relevant Documents
Prepare Context
Build Prompt
Send Request to Language Model
Receive AI Response
Return Answer to User

Sending the retrieved results to the language model is the bridge between the retrieval system and the AI model.


Why Send Retrieved Results?

Large Language Models do not automatically have access to:

  • SQL databases
  • Internal documentation
  • Company policies
  • Product catalogs
  • Customer records
  • Knowledge bases

Instead, developers retrieve the necessary information and include it in the prompt sent to the model.

This process grounds the AI response in trusted, current information.


Components of a Request

A typical request sent to a language model includes several elements.

System Instructions

The system message defines the model’s role and behavior.

Example:

You are an expert SQL database assistant.
Answer only using the supplied context.

System instructions establish the rules the model should follow.


Retrieved Context

The retrieved context contains the information found during vector or hybrid search.

Example:

Document:
Clustered indexes physically store rows according to the index key.

Only relevant context should be included.


User Question

The original user request is included.

Example:

Why do clustered indexes improve query performance?

The language model combines the retrieved context with the user question to generate an answer.


Output Instructions

Developers may specify:

  • Response length
  • Formatting
  • Tone
  • JSON output
  • Markdown output
  • Bullet lists

Example:

Provide a concise answer in three bullet points.

Preparing Retrieved Results

Retrieved documents often require preprocessing before being sent to the model.

Common preprocessing tasks include:

  • Removing duplicate documents
  • Eliminating irrelevant information
  • Trimming excessively long content
  • Combining related results
  • Filtering unauthorized information
  • Formatting structured data as JSON when appropriate

Proper preparation improves both response quality and efficiency.


Selecting Relevant Context

Sending too much information can reduce answer quality and increase cost.

Best practice:

Retrieve only the top-ranking documents.

For example:

Instead of sending:

  • 50 documents

Send:

  • Top 3–10 highly relevant documents

The exact number depends on the application’s requirements and the model’s context window.


Structuring the Prompt

A well-organized prompt improves response quality.

A common structure is:

System Instructions
Retrieved Context
User Question
Expected Response Format

Example:

You are a SQL expert.
Context:
Clustered indexes physically organize table rows according to the key.
Question:
Why do clustered indexes improve query performance?
Answer only using the provided context.

Sending Structured Data

Sometimes the retrieved information is relational data rather than documents.

Example SQL output:

CustomerCountryCredit Limit
ContosoUSA50000

Instead of sending the table directly, developers often convert it to JSON.

Example:

{
"Customer":"Contoso",
"Country":"USA",
"CreditLimit":50000
}

JSON provides a structured format that AI services process efficiently.


Calling the Language Model

Most AI services expose REST APIs.

A request typically includes:

  • HTTPS endpoint
  • HTTP POST method
  • Authentication
  • JSON payload

Conceptually:

Prompt
JSON Request
REST API
Language Model
JSON Response

SQL Server and Azure SQL Database can call supported REST endpoints using the sp_invoke_external_rest_endpoint stored procedure where available.


Processing the Response

Most AI services return JSON.

Example:

{
"choices":[
{
"message":{
"content":"Clustered indexes improve performance because..."
}
}
]
}

SQL applications can extract the generated text using JSON functions such as:

  • JSON_VALUE
  • JSON_QUERY
  • OPENJSON

The application can then display, store, or further process the generated response.


Managing Context Windows

Every language model has a maximum context window.

The context window includes:

  • System instructions
  • Retrieved documents
  • User question
  • Previous conversation
  • Generated response

If too much information is included, requests may fail or important information may be truncated.

Developers should:

  • Remove irrelevant content.
  • Retrieve fewer documents.
  • Summarize long documents.
  • Limit prompt size.

Token Usage

Language models process text as tokens.

More retrieved content means:

  • More input tokens
  • Longer inference time
  • Higher API costs
  • Increased latency

Reducing unnecessary context improves both performance and cost efficiency.


Security Considerations

Developers should never send sensitive information unnecessarily.

Examples include:

  • Passwords
  • Authentication secrets
  • Personal identifiers
  • Confidential financial records
  • Protected health information
  • Internal security credentials

Before sending data to an external AI service:

  • Apply row-level security (RLS).
  • Apply column-level security.
  • Remove confidential fields.
  • Mask sensitive values when appropriate.
  • Verify user authorization.

Grounding the Response

One of the primary goals of RAG is grounding.

Grounding means that the model bases its answer on retrieved information rather than relying solely on its internal training.

Example instruction:

Answer only using the supplied documents.
If the answer is unavailable, say you do not know.

This helps reduce hallucinations.


Handling Errors

Common issues include:

Authentication Failures

Examples:

  • Expired tokens
  • Invalid credentials
  • Missing permissions

Network Problems

Examples:

  • Endpoint unavailable
  • Timeouts
  • DNS failures

Rate Limits

AI services may return:

429 Too Many Requests

Applications should implement retry logic using exponential backoff.


Invalid Requests

Examples:

  • Malformed JSON
  • Missing prompt
  • Unsupported parameters

Performance Considerations

Factors affecting performance include:

  • Prompt size
  • Number of retrieved documents
  • Network latency
  • AI model size
  • Token count
  • Response length
  • Concurrent requests

Performance can often be improved by:

  • Sending fewer documents.
  • Using concise prompts.
  • Removing duplicate information.
  • Optimizing retrieval quality.

Common Mistakes

Sending Irrelevant Documents

The language model may generate inaccurate or confusing responses.


Including Entire Database Records

Large prompts increase token usage and cost.


Poor Prompt Design

Ambiguous instructions often produce inconsistent responses.


Ignoring Security

Sensitive information should never be included unless necessary and authorized.


Missing Grounding Instructions

Without guidance, the model may rely on general knowledge instead of retrieved context.


Best Practices

  • Retrieve only the most relevant documents.
  • Use clear system instructions.
  • Include the user’s original question.
  • Organize prompts consistently.
  • Limit prompt size to reduce token usage.
  • Convert structured data to JSON when appropriate.
  • Remove sensitive information before sending requests.
  • Validate JSON payloads.
  • Monitor latency and token consumption.
  • Evaluate AI responses for accuracy and relevance.

Real-World Example

A company stores warranty information in SQL Server.

Workflow:

  1. Customer asks:”Is my laptop still under warranty?”
  2. SQL retrieves:
Product: X500
Purchase Date: January 10, 2025
Warranty: 2 Years
  1. JSON is generated:
{
"Product":"X500",
"PurchaseDate":"2025-01-10",
"Warranty":"2 Years"
}
  1. Prompt sent to the language model:
Use the following warranty information:
{
"Product":"X500",
"PurchaseDate":"2025-01-10",
"Warranty":"2 Years"
}
Answer whether the warranty is still valid.

The language model generates a grounded response using the supplied business data.


DP-800 Exam Tips

Remember these key points for the exam:

  • Sending results to the language model is the final step before AI response generation in a RAG workflow.
  • Retrieved documents should be relevant, concise, and properly formatted.
  • System instructions help guide model behavior.
  • Structured SQL data is often converted to JSON before being included in prompts.
  • Smaller prompts reduce latency and token costs.
  • Grounding instructions help reduce hallucinations.
  • Responses from AI services are typically returned as JSON.
  • Sensitive information should be removed before sending requests to external AI services.

Practice Exam Questions

Question 1

A developer is building a Retrieval-Augmented Generation (RAG) application.

After retrieving relevant documents from a vector search, what is the next logical step?

A. Send the retrieved context to the language model as part of the prompt.

B. Retrain the language model.

C. Rebuild the vector index.

D. Delete duplicate embeddings.

Answer: A

Explanation:
After retrieval, the relevant documents are incorporated into the prompt and sent to the language model so it can generate a grounded response.


Question 2

Why should retrieved documents be included in a prompt sent to a language model?

A. To permanently update the model’s training data.

B. To ground the model’s response using relevant information.

C. To reduce embedding dimensions.

D. To replace vector indexes.

Answer: B

Explanation:
Including retrieved context enables the model to generate responses based on current, authoritative information rather than relying solely on pre-trained knowledge.


Question 3

Which prompt component defines the behavior the language model should follow?

A. Retrieved context

B. User question

C. System instructions

D. JSON response

Answer: C

Explanation:
System instructions establish the role, behavior, and constraints for the language model, such as answering only from the supplied context.


Question 4

A developer sends fifty retrieved documents to a language model, even though only five are relevant.

What is the most likely consequence?

A. Improved grounding accuracy.

B. Reduced API costs.

C. Faster inference.

D. Increased token usage, latency, and potential reduction in response quality.

Answer: D

Explanation:
Including excessive context increases prompt size, consumes more tokens, raises costs, and may dilute the relevance of the information presented to the model.


Question 5

Which format is commonly used to send structured SQL query results to a language model?

A. Binary

B. XML

C. JSON

D. CSV

Answer: C

Explanation:
JSON is the standard format for exchanging structured data with AI services because it is lightweight, hierarchical, and widely supported.


Question 6

What is the primary purpose of grounding instructions such as “Answer only using the supplied context”?

A. Increase the embedding dimension.

B. Reduce hallucinations by limiting the model to retrieved information.

C. Eliminate authentication requirements.

D. Automatically compress prompts.

Answer: B

Explanation:
Grounding instructions encourage the model to base its responses on the retrieved documents instead of relying on unsupported assumptions or prior training.


Question 7

A language model returns its response as JSON.

Which SQL functions can be used to extract the generated answer?

A. MERGE and GROUP BY

B. ROW_NUMBER and RANK

C. STRING_AGG and PIVOT

D. JSON_VALUE, JSON_QUERY, and OPENJSON

Answer: D

Explanation:
SQL Server provides JSON functions that allow applications to parse AI responses and extract specific values from JSON documents.


Question 8

Which security practice is most appropriate before sending retrieved results to an external AI service?

A. Include every available column to maximize context.

B. Remove sensitive or unauthorized information from the retrieved data.

C. Disable row-level security.

D. Send authentication credentials within the prompt.

Answer: B

Explanation:
Only the information necessary for the AI task should be sent. Sensitive data should be removed or masked, and normal security controls should remain in effect.


Question 9

Why is prompt size an important consideration when sending results to a language model?

A. Larger prompts always improve response quality.

B. Prompt size has no effect on AI services.

C. Larger prompts increase token usage, cost, and response latency.

D. Prompt size determines the embedding algorithm.

Answer: C

Explanation:
Every token contributes to processing time and cost. Keeping prompts concise improves performance while reducing API expenses.


Question 10

A company wants an AI assistant to answer questions using current warranty information stored in SQL Server.

Which approach best supports this requirement?

A. Fine-tune the language model every time warranty records change.

B. Store warranty records directly inside the model.

C. Build a RAG workflow that retrieves the current warranty data, formats it appropriately, and sends it to the language model.

D. Disable retrieval and rely only on the model’s training data.

Answer: C

Explanation:
A RAG solution retrieves current business data at query time, formats it (often as JSON), and sends it to the language model, allowing responses to remain accurate without requiring model retraining.


Go to the DP-800 Exam Prep Hub main page

Extract language model responses (DP-800 Exam Prep)

This post is a part of the DP-800: Developing AI-Enabled Database Solutions Exam Prep Hub.
This topic falls under these sections:
Implement AI capabilities in database solutions (25–30%)
   --> Design and implement retrieval-augmented generation (RAG)
      --> Extract language model responses


Note that there are 10 practice questions (with answers) at the end of each section to help you solidify your knowledge of the material. Also, there are 4 practice tests with 30 questions each available from the hub's main page below the exam topics section.

Introduction

After a Large Language Model (LLM) generates a response, database applications must extract the returned content so it can be displayed to users, stored in the database, or used by downstream processes. Because most AI services return results in JSON format, developers must understand how to parse JSON, extract relevant values, handle errors, validate responses, and integrate the output into SQL-based applications.

For the DP-800 exam, you should understand the structure of language model responses, how to extract values using SQL JSON functions, how to handle different response formats, and the best practices for securely and efficiently processing AI-generated output.


Where Response Extraction Fits in a RAG Workflow

Extracting the language model response is one of the final stages in a Retrieval-Augmented Generation (RAG) pipeline.

User Question
Retrieve Relevant Documents
Build Prompt
Send Request to AI Model
Receive JSON Response
Extract Generated Content
Display or Store Results

Without response extraction, the application cannot effectively use the AI-generated answer.


Why AI Responses Are Returned as JSON

Most AI services expose REST APIs.

REST APIs typically exchange data using JSON because it is:

  • Lightweight
  • Human-readable
  • Machine-readable
  • Widely supported
  • Easy to parse

Whether using Azure AI Foundry models, Azure OpenAI Service, or other AI providers, JSON is the standard response format.


Typical Language Model Response

Although the exact schema varies by provider and API version, chat completion APIs commonly return a structure similar to the following:

{
"choices": [
{
"message": {
"role": "assistant",
"content": "Clustered indexes improve performance because the table rows are stored in key order."
}
}
]
}

The application typically extracts only the generated text, while ignoring metadata unless it is needed for monitoring or diagnostics.


Common Elements in AI Responses

A language model response may include:

  • Generated text
  • Response identifier
  • Model name
  • Completion reason
  • Token usage statistics
  • Timestamps
  • Metadata

Example (simplified):

{
"id": "chatcmpl-123",
"model": "gpt-4.1",
"choices": [
{
"message": {
"content": "Answer text..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 125,
"completion_tokens": 38,
"total_tokens": 163
}
}

Developers often extract both the generated answer and token usage for logging or cost monitoring.


Parsing JSON in SQL

SQL Server and Azure SQL Database provide built-in JSON functions.

The most commonly used are:

  • JSON_VALUE
  • JSON_QUERY
  • OPENJSON

These functions enable developers to retrieve values from JSON returned by an AI service.


Using JSON_VALUE

JSON_VALUE extracts a single scalar value.

Example:

SELECT JSON_VALUE(@Response,
'$.choices[0].message.content');

Result:

Clustered indexes improve performance because...

This is the most common method for retrieving the generated response.


Using JSON_QUERY

JSON_QUERY extracts JSON objects or arrays.

Example:

SELECT JSON_QUERY(@Response,
'$.choices');

This returns the complete choices array rather than a single value.

Use JSON_QUERY when you need an entire object or array for further processing.


Using OPENJSON

OPENJSON converts JSON into relational rows and columns.

Example:

SELECT *
FROM OPENJSON(@Response, '$.choices');

This is useful when:

  • Multiple completions are returned
  • Arrays must be processed
  • Nested JSON must be flattened

Extracting Token Usage

Many AI services report token consumption.

Example:

{
"usage": {
"prompt_tokens":125,
"completion_tokens":40,
"total_tokens":165
}
}

Developers can extract these values.

Example:

SELECT JSON_VALUE(@Response,
'$.usage.total_tokens');

Tracking token usage helps monitor:

  • API costs
  • Performance
  • Resource consumption

Processing Multiple Choices

Some APIs may return multiple candidate responses.

Example:

{
"choices":[
{"message":{"content":"Option 1"}},
{"message":{"content":"Option 2"}}
]
}

Developers can use OPENJSON to iterate through the array and select the preferred response.


Storing AI Responses

Generated responses may be:

  • Displayed to users
  • Saved to SQL tables
  • Logged for auditing
  • Indexed for future retrieval
  • Used by downstream workflows

Example table:

RequestIDUserQuestionAIResponseDateGenerated

Proper storage supports auditing, analytics, and troubleshooting.


Validating Responses

Applications should validate AI responses before using them.

Check for:

  • Missing content
  • Empty responses
  • Malformed JSON
  • Unexpected schema
  • API errors

Validation improves application reliability.


Handling API Errors

Not every REST call succeeds.

Possible errors include:

Authentication Failure

Examples:

  • Invalid token
  • Expired credentials

Network Errors

Examples:

  • Timeout
  • DNS failure
  • Connection failure

Invalid Request

Examples:

  • Malformed JSON
  • Missing prompt
  • Unsupported parameters

Rate Limiting

Example:

429 Too Many Requests

Applications should implement retry logic using exponential backoff where appropriate.


Finish Reasons

Many chat completion APIs include a finish reason.

Examples:

  • stop
  • length
  • content_filter

Meaning:

Finish ReasonDescription
stopNormal completion
lengthMaximum token limit reached
content_filterResponse filtered by safety system

Applications may use this information to determine whether a response is complete.


Processing Structured Output

Some prompts request JSON output rather than plain text.

Example response:

{
"summary":"Order shipped.",
"priority":"High"
}

SQL JSON functions can extract each property individually.

Example:

SELECT JSON_VALUE(@Response,
'$.summary');

Structured outputs are particularly useful for workflow automation.


Security Considerations

When processing AI responses:

  • Validate all returned data.
  • Do not assume responses are always correct.
  • Avoid executing generated SQL without validation.
  • Protect sensitive information.
  • Log responses securely.
  • Apply least-privilege access controls.

Even trusted AI services should be treated as external systems whose outputs require validation.


Performance Considerations

Large responses require:

  • More network bandwidth
  • More parsing time
  • More storage
  • More tokens

Developers should:

  • Limit response length where appropriate.
  • Extract only required fields.
  • Avoid storing unnecessary metadata.
  • Archive logs according to retention policies.

Common Mistakes

Assuming Every Response Has the Same Schema

Different AI services and API versions may return different JSON structures.


Ignoring Errors

Applications should always check for API failures before attempting to parse the response.


Parsing Entire JSON Documents

Extract only the required values to improve efficiency.


Not Validating Responses

Malformed or incomplete responses should be handled gracefully.


Ignoring Token Usage

Monitoring token consumption helps control costs.


Best Practices

  • Parse responses using SQL JSON functions.
  • Use JSON_VALUE for scalar values.
  • Use JSON_QUERY for objects and arrays.
  • Use OPENJSON for arrays and complex JSON.
  • Validate response schemas before processing.
  • Log errors separately from successful responses.
  • Track token usage for monitoring and optimization.
  • Limit stored data to what is necessary.
  • Handle rate limits and transient failures gracefully.
  • Design applications to tolerate API schema changes when possible.

Real-World Example

A customer asks:

“Summarize this support ticket.”

The application:

  1. Retrieves ticket information from SQL.
  2. Sends it to a language model.
  3. Receives:
{
"choices":[
{
"message":{
"content":"The customer reports intermittent login failures caused by expired authentication tokens."
}
}
]
}

The application extracts:

SELECT JSON_VALUE(@Response,
'$.choices[0].message.content');

The extracted summary is displayed to the support agent and optionally stored for future reference.


DP-800 Exam Tips

Remember these key points for the exam:

  • Most language model APIs return JSON responses.
  • JSON_VALUE extracts individual scalar values.
  • JSON_QUERY retrieves JSON objects or arrays.
  • OPENJSON converts JSON arrays and objects into relational data.
  • Applications should validate AI responses before using them.
  • Token usage information helps monitor API costs.
  • Finish reasons indicate how the model completed generation.
  • Handle API errors, rate limits, and malformed responses gracefully.
  • Store only the data needed for business purposes.
  • AI-generated output should always be treated as data that requires validation before use.

Practice Exam Questions

Question 1

A SQL application receives a JSON response from a language model and needs to extract the generated answer.

Which SQL function is most appropriate for retrieving a single text value?

A. JSON_VALUE

B. JSON_QUERY

C. OPENJSON

D. STRING_SPLIT

Answer: A

Explanation:
JSON_VALUE extracts a single scalar value from a JSON document, making it ideal for retrieving the generated response text.


Question 2

A developer wants to retrieve the entire choices array from a language model response.

Which SQL function should be used?

A. ROW_NUMBER

B. JSON_QUERY

C. MERGE

D. JSON_VALUE

Answer: B

Explanation:
JSON_QUERY returns JSON objects or arrays rather than individual scalar values, making it appropriate for extracting the complete choices array.


Question 3

When is OPENJSON most useful?

A. When extracting a single property value.

B. When converting JSON arrays into relational rows and columns.

C. When generating embeddings.

D. When creating vector indexes.

Answer: B

Explanation:
OPENJSON parses JSON arrays and objects into tabular data that can be queried using SQL.


Question 4

Why should applications validate AI responses before using them?

A. JSON responses are always encrypted.

B. Validation reduces database storage requirements.

C. AI responses may be malformed, incomplete, or contain unexpected structures.

D. Validation automatically reduces token usage.

Answer: C

Explanation:
Applications should verify that responses are valid, complete, and conform to the expected schema before processing them.


Question 5

A developer wants to monitor AI service costs.

Which information should be extracted from the response?

A. The database transaction log.

B. Vector dimensions.

C. Token usage statistics.

D. Query execution plans.

Answer: C

Explanation:
Many AI APIs return token usage information, which is useful for monitoring API consumption and estimating costs.


Question 6

What does a finish reason of stop typically indicate?

A. The request exceeded the maximum token limit.

B. The response was blocked by a content filter.

C. The model completed the response normally.

D. Authentication failed.

Answer: C

Explanation:
A finish reason of stop indicates that the model reached a natural completion point without interruption.


Question 7

A developer receives multiple candidate responses from an AI service.

Which SQL feature is best suited for processing all returned responses?

A. JSON_VALUE

B. OPENJSON

C. GROUP BY

D. FOR JSON AUTO

Answer: B

Explanation:
OPENJSON can iterate through arrays, making it ideal for processing multiple response choices.


Question 8

Which practice best improves the reliability of applications consuming AI responses?

A. Assume every response follows the same JSON schema.

B. Execute AI-generated SQL statements without review.

C. Validate the response structure and handle errors gracefully.

D. Ignore API error messages.

Answer: C

Explanation:
Validating responses and implementing robust error handling help applications remain reliable even when API responses change or errors occur.


Question 9

Why should developers avoid storing unnecessary metadata from AI responses?

A. Metadata prevents JSON parsing.

B. It can increase storage requirements without providing business value.

C. Metadata invalidates embeddings.

D. Metadata reduces retrieval accuracy.

Answer: B

Explanation:
Storing only the required information minimizes storage costs and simplifies downstream processing.


Question 10

A SQL application receives the following JSON:

{
"choices":[
{
"message":{
"content":"The shipment will arrive tomorrow."
}
}
]
}

Which value should typically be presented to the end user?

A. The complete JSON document.

B. The choices array.

C. The generated text contained in message.content.

D. The API response identifier.

Answer: C

Explanation:
The value stored in message.content contains the natural-language response generated by the language model and is typically the information displayed to users.


Go to the DP-800 Exam Prep Hub main page

Evaluate external models, including multimodal, multilanguage, sizes, and structured output (DP-800 Exam Prep)

This post is a part of the DP-800: Developing AI-Enabled Database Solutions Exam Prep Hub.
This topic falls under these sections:
Implement AI capabilities in database solutions (25–30%)
   --> Design and implement models and embeddings
      --> Evaluate external models, including multimodal, multilanguage, sizes, and structured output


Note that there are 10 practice questions (with answers) at the end of each section to help you solidify your knowledge of the material. Also, there are 4 practice tests with 30 questions each available from the hub's main page below the exam topics section.

Introduction

One of the most important responsibilities of a SQL AI Developer is selecting the appropriate AI model for a given business problem. Microsoft SQL Server, Azure SQL Database, Azure SQL Managed Instance, and Azure AI services increasingly integrate with external Large Language Models (LLMs) and embedding models to provide intelligent capabilities such as natural language querying, document summarization, semantic search, recommendation engines, and Retrieval-Augmented Generation (RAG).

Not every model is suitable for every workload. Larger models generally provide better reasoning but incur higher costs and latency. Smaller models offer faster responses and lower costs but may lack advanced reasoning capabilities. Some models support images and audio (multimodal), while others specialize in text or code. Additionally, many enterprise applications require structured outputs such as JSON rather than free-form text.

For the DP-800 exam, candidates should understand how to evaluate external models based on business requirements, performance, cost, scalability, and AI capabilities.


What Are External Models?

An external model is an AI model that runs outside the database engine and is accessed through an API or AI service.

Examples include:

  • Azure OpenAI models
  • Azure AI Foundry-hosted models
  • Open-source models hosted on Azure AI Foundry or Kubernetes
  • Other cloud-hosted foundation models exposed through REST APIs

Instead of performing AI inference inside SQL Server, the application or database calls an external service.

Example architecture:

Application
Azure SQL Database
Azure OpenAI Service
AI Model
Generated Response

This approach allows SQL-based applications to leverage continuously improving AI models without modifying the database engine.


Factors When Evaluating External Models

Several characteristics should be considered before selecting a model.

These include:

  • Accuracy
  • Reasoning capability
  • Response quality
  • Cost
  • Latency
  • Throughput
  • Context window size
  • Structured output support
  • Multilingual capability
  • Multimodal capability
  • Security and compliance
  • Availability
  • Scalability

Selecting the right model is often a balance between these factors rather than maximizing any single characteristic.


Evaluating Multimodal Models

What Is a Multimodal Model?

A multimodal model can process multiple types of input rather than only text.

Common input types include:

  • Text
  • Images
  • Documents
  • Charts
  • Audio
  • Video (supported by some models)

Example:

A customer uploads:

  • Invoice PDF
  • Photograph of damaged goods
  • Written description

A multimodal model can analyze all three inputs together.


Business Scenarios

Multimodal models are useful for:

  • Document analysis
  • Invoice processing
  • Insurance claims
  • Medical imaging
  • Manufacturing quality inspections
  • Product recognition
  • OCR-enhanced workflows
  • Diagram interpretation

Example:

Instead of asking:

“Describe this invoice.”

The application uploads the invoice itself.

The model extracts:

  • Vendor
  • Invoice number
  • Total
  • Purchase date
  • Line items

Advantages

Multimodal models:

  • Reduce preprocessing
  • Improve accuracy
  • Handle real-world data
  • Simplify AI workflows
  • Support richer user experiences

Limitations

They typically:

  • Cost more
  • Require more compute resources
  • Have higher latency
  • Process larger payloads
  • May not be necessary for text-only applications

Evaluating Multilingual Models

Many enterprise applications serve users around the world.

A multilingual model understands and generates responses in multiple languages without requiring translation.

Example languages include:

  • English
  • Spanish
  • French
  • German
  • Portuguese
  • Japanese
  • Chinese
  • Korean
  • Arabic

Example

Customer question:

Spanish:

¿Cuál es el estado de mi pedido?

The AI responds correctly in Spanish.


Business Benefits

Multilingual models:

  • Improve customer experience
  • Eliminate translation pipelines
  • Simplify global deployments
  • Maintain conversational context across languages
  • Reduce development complexity

Evaluation Criteria

When comparing multilingual models, evaluate:

  • Number of supported languages
  • Translation quality
  • Cultural understanding
  • Domain-specific terminology
  • Consistency across languages
  • Response quality

Common Use Cases

  • Global customer support
  • International e-commerce
  • Government services
  • Travel applications
  • Healthcare portals
  • Financial institutions

Evaluating Model Size

Model size generally refers to the relative complexity and capability of an AI model. While parameter counts are not always publicly disclosed for commercial models, larger models typically provide stronger reasoning at the cost of increased compute requirements.

Generally:

Small model

  • Faster
  • Lower cost
  • Lower latency

Large model

  • Better reasoning
  • Better code generation
  • Better summarization
  • Higher cost
  • Higher latency

Small Models

Ideal for:

  • Chatbots
  • Classification
  • Data extraction
  • Intent detection
  • Basic summarization

Advantages:

  • Fast responses
  • Low operational cost
  • High throughput
  • Efficient scaling

Medium Models

Good balance between:

  • Performance
  • Cost
  • Accuracy

Typical uses:

  • Customer support
  • SQL generation
  • Business assistants
  • Document summarization

Large Models

Best for:

  • Complex reasoning
  • Long documents
  • Advanced coding
  • RAG
  • Planning
  • Agentic AI

Trade-offs include:

  • Higher inference costs
  • Greater latency
  • Increased resource consumption

Latency vs. Accuracy

Every AI solution involves balancing response speed and output quality.

Example:

Customer chatbot

Acceptable latency:

2–3 seconds

Scientific research assistant

Acceptable latency:

10–20 seconds

because answer quality matters more than speed.


Trade-Off Example

RequirementPreferred Model
Fast API responsesSmaller model
High-quality reasoningLarger model
Thousands of concurrent usersSmaller or medium model
Legal document analysisLarger model
AI coding assistantLarger model
FAQ chatbotSmaller model

Context Window Size

The context window defines how much information the model can process in a single request.

A larger context window allows the model to consider more text simultaneously.

Examples include:

  • Long contracts
  • Large knowledge bases
  • Entire manuals
  • Meeting transcripts
  • Large SQL schemas

Benefits

Larger context windows reduce the need to split documents into smaller chunks and help preserve context across lengthy inputs.


Limitations

Larger contexts generally:

  • Increase processing time
  • Increase inference cost
  • Consume more tokens

Applications should include only relevant information rather than maximizing context size unnecessarily.


Structured Output

Many enterprise applications require machine-readable responses instead of conversational text.

Example:

Instead of:

“The customer’s order total is $425 and ships tomorrow.”

Return:

{
"customer":"John Smith",
"orderTotal":425,
"shipDate":"2026-07-29"
}

Structured output allows applications to parse responses reliably.


Why Structured Output Matters

Applications can:

  • Deserialize JSON
  • Populate SQL tables
  • Call stored procedures
  • Trigger workflows
  • Validate data
  • Build dashboards

without performing fragile text parsing.


Common Structured Formats

  • JSON
  • JSON arrays
  • Objects
  • Lists
  • Tables
  • XML (less common)
  • Markdown tables (for presentation)

JSON remains the most common structured format for modern AI integrations.


Function Calling and Tool Use

Many modern models support function calling (also called tool calling), where the model requests that the application invoke predefined functions or APIs instead of generating all information directly.

Example workflow:

User
LLM
Calls:
GetCustomerOrders()
Application
SQL Database
Results
LLM
Final Answer

This approach improves accuracy by combining model reasoning with authoritative business data.


Cost Considerations

AI model selection has a direct impact on operational cost.

Factors affecting cost include:

  • Model complexity
  • Input tokens
  • Output tokens
  • Images processed
  • Audio processed
  • Request volume
  • Concurrency
  • Context window size

A higher-capability model should only be selected when its additional reasoning or multimodal features provide measurable business value.


Benchmarking Models

Before deploying an external model into production, evaluate it against representative workloads.

Typical metrics include:

  • Response accuracy
  • Hallucination rate
  • Latency
  • Cost per request
  • Throughput
  • Reliability
  • Structured output validity
  • Multilingual quality
  • Safety and policy compliance

Use realistic prompts and datasets that reflect production scenarios.


Security and Responsible AI

When integrating external models with SQL-based applications:

  • Protect sensitive data.
  • Apply the principle of least privilege.
  • Use managed identities where possible.
  • Store secrets securely (for example, in Azure Key Vault).
  • Validate AI-generated outputs before acting on them.
  • Avoid sending unnecessary personally identifiable information (PII) to external services.
  • Monitor prompts and responses for safety, quality, and compliance.

Azure OpenAI Model Selection Guidance

Although Microsoft’s available models evolve over time, the evaluation process remains consistent.

When choosing a model, consider:

  • Does the workload require multimodal input?
  • Is multilingual support necessary?
  • What response latency is acceptable?
  • How much reasoning capability is required?
  • Is structured JSON output needed?
  • Will the model participate in a RAG workflow?
  • What are the expected request volumes?
  • What is the available budget?

The best model is the one that satisfies the business requirements while meeting performance, cost, and governance objectives.


Best Practices

  • Match model capability to business requirements.
  • Avoid selecting the largest model unless its advanced capabilities are needed.
  • Use structured outputs whenever applications consume AI responses programmatically.
  • Benchmark multiple models using representative production scenarios.
  • Minimize token usage to reduce costs and improve response times.
  • Use multimodal models only when image, audio, or document understanding is required.
  • Validate generated content before updating databases or executing business processes.
  • Monitor quality, latency, and cost continuously after deployment.

DP-800 Exam Tips

Remember these key distinctions for the exam:

  • Multimodal models process multiple input types, such as text and images.
  • Multilingual models understand and generate content in multiple languages without requiring separate translation services.
  • Smaller models typically provide lower latency and lower cost, making them suitable for high-volume, straightforward tasks.
  • Larger models generally provide stronger reasoning, summarization, and code generation but require more compute resources and incur higher costs.
  • Structured outputs, particularly JSON, are preferred when AI responses must be consumed by applications, APIs, or SQL processes.
  • Function calling allows models to invoke trusted business logic or database operations instead of relying solely on generated responses.
  • Model selection should always balance accuracy, latency, scalability, cost, security, and maintainability.

Summary

Selecting an external AI model is one of the most important architectural decisions in AI-enabled database solutions. The ideal model depends on the workload, whether that involves multilingual customer support, multimodal document analysis, structured data extraction, or advanced reasoning over enterprise data.

For the DP-800 exam, focus on understanding the trade-offs among model capabilities rather than memorizing specific model names. Be prepared to evaluate models based on multimodal support, multilingual performance, reasoning quality, latency, cost, context window size, and structured output capabilities. Equally important is understanding how these models integrate with Azure SQL and Azure AI services to build scalable, secure, and maintainable AI-enabled database solutions.


Practice Exam Questions


Question 1

You are developing an AI-enabled application that summarizes support tickets stored in Azure SQL Database. The application must support English, Spanish, French, German, and Japanese without deploying separate models for each language.

Which type of model best satisfies this requirement?

A. A monolingual English language model with prompt translation
B. A multilingual language model trained on multiple languages
C. A computer vision model with OCR capabilities
D. A speech recognition model

Correct Answer: B

Explanation:
Multilingual large language models (LLMs) are specifically trained to understand and generate text in many languages, eliminating the need to deploy separate models for each supported language. While prompt translation can work, it introduces additional latency and possible translation inaccuracies. Computer vision and speech models are not designed for multilingual text generation.


Question 2

An organization wants an AI model that can analyze scanned invoices, extract tables, understand handwritten notes, and answer user questions about the document.

Which model capability is required?

A. Structured output only
B. Text embedding generation
C. Multimodal processing
D. Sentiment analysis

Correct Answer: C

Explanation:
Multimodal models process multiple input types—including images, documents, handwritten text, and natural language—allowing them to interpret invoices and answer questions. Embedding models create vector representations but do not analyze images directly.


Question 3

You need an AI model that consistently returns data in valid JSON matching a predefined schema for direct insertion into a SQL table.

Which capability should you prioritize?

A. Long context window
B. Large parameter count
C. Function calling only
D. Structured output support

Correct Answer: D

Explanation:
Structured output capabilities ensure responses conform to predefined schemas such as JSON, reducing parsing errors and simplifying database integration. Function calling invokes external operations but does not guarantee JSON schema compliance.


Question 4

Your application performs simple product categorization and sentiment analysis on thousands of customer reviews every minute. Response time and operational cost are more important than handling complex reasoning tasks.

Which model size is the most appropriate?

A. The largest available reasoning model
B. A medium-sized multimodal model
C. A small language model optimized for classification tasks
D. A vision-language model

Correct Answer: C

Explanation:
Simple classification workloads generally do not require large reasoning models. Smaller models provide lower latency, reduced infrastructure costs, and sufficient accuracy for routine categorization and sentiment analysis.


Question 5

A financial institution evaluates several external AI models before deployment.

Which factor should receive the highest priority when handling confidential customer information?

A. Number of supported programming languages
B. Data privacy and regulatory compliance
C. Maximum context window size
D. Availability of image generation

Correct Answer: B

Explanation:
For regulated industries, protecting sensitive information and complying with regulations are primary evaluation criteria. Features such as image generation or larger context windows are secondary if the model cannot satisfy organizational security and compliance requirements.


Question 6

Your organization must choose between two external language models.

Model A produces slightly more accurate answers but averages 8 seconds per response.

Model B is slightly less accurate but consistently responds in under one second.

Which consideration is being evaluated?

A. Tokenization strategy
B. Embedding dimensions
C. Latency versus accuracy tradeoff
D. Database normalization

Correct Answer: C

Explanation:
Model evaluation frequently involves balancing response quality against latency. Interactive applications often prioritize faster responses, while analytical workloads may tolerate longer processing times for greater accuracy.


Question 7

A development team is comparing two embedding models.

One produces 768-dimensional vectors while another produces 3,072-dimensional vectors.

What is generally true?

A. Higher-dimensional embeddings always guarantee better search results.
B. Larger embeddings often improve semantic representation but require more storage and computation.
C. Embedding dimensions have no effect on vector databases.
D. Smaller embeddings always produce higher recall.

Correct Answer: B

Explanation:
Higher-dimensional vectors can capture richer semantic information but increase storage requirements, indexing costs, and similarity search computation. Larger dimensions do not automatically produce better search quality.


Question 8

A healthcare application requires AI-generated discharge summaries that follow a strict template so they can be automatically imported into Azure SQL Database.

Which model feature is most important?

A. Image generation capabilities
B. Speech synthesis support
C. Larger token limits only
D. Structured output generation

Correct Answer: D

Explanation:
Structured outputs enable AI-generated responses to consistently match required formats, such as JSON or predefined schemas, simplifying automated ingestion into databases and reducing validation errors.


Question 9

Why might an organization intentionally choose a smaller external language model instead of the newest, largest model?

A. Smaller models are always more accurate.
B. Smaller models always support more languages.
C. Smaller models often provide lower cost, reduced latency, and sufficient performance for many workloads.
D. Smaller models eliminate the need for prompt engineering.

Correct Answer: C

Explanation:
Many enterprise workloads involve straightforward tasks where the largest model offers minimal additional benefit. Smaller models frequently provide faster responses, lower inference costs, and simpler deployment while meeting performance requirements.


Question 10

An AI-enabled SQL application must process both text and uploaded product images to answer customer questions.

Which model should be recommended?

A. A multimodal language model
B. A text embedding model only
C. A relational database engine
D. A recommendation engine

Correct Answer: A

Explanation:
Multimodal models can simultaneously process textual and visual information, enabling users to ask questions about images and receive context-aware responses. Text embedding models only generate vector representations and cannot directly analyze images.


Exam Tips

For the DP-800 exam, remember these key evaluation principles when selecting external AI models:

  • Select multilingual models when supporting multiple languages without translation pipelines.
  • Choose multimodal models whenever applications must process images, documents, audio, or mixed media.
  • Prefer structured output capabilities when AI responses must populate SQL tables or APIs reliably.
  • Evaluate model size based on workload complexity, balancing cost, latency, throughput, and reasoning ability.
  • Consider privacy, compliance, and data residency before selecting external AI services.
  • Compare models using multiple metrics, including accuracy, latency, throughput, token limits, context window size, scalability, and operational cost.
  • Remember that larger models are not always the best choice—the optimal model is the one that best satisfies the application’s functional, performance, security, and budget requirements.

Go to the DP-800 Exam Prep Hub main page

Deploy and consume LLMs, small models, code models, and multimodal models (AI-103 Exam Prep)

This post is a part of the AI-103: Develop AI Apps and Agents on Azure Exam Prep Hub. 
This topic falls under these sections:
Implement generative AI and agentic solutions (30–35%)
--> Build generative applications by using Foundry
--> Deploy and consume LLMs, small models, code models, and multimodal models


Note that there are 10 practice questions (with answers and explanations) at the end of each section to help you solidify your knowledge of the material. Also, there are 2 practice tests with 60 questions each available from the hub's main page below the exam topics section.

Introduction

Modern AI applications rely on a wide variety of AI models.

Different models are optimized for different workloads, including:

  • Conversational AI
  • Code generation
  • Text summarization
  • Image understanding
  • Audio processing
  • Reasoning tasks
  • Agentic workflows

The AI-103: Develop AI Apps and Agents on Azure certification exam tests your understanding of how to deploy and consume AI models in Azure AI Foundry.

For the AI-103 exam, you should understand:

  • Large language models (LLMs)
  • Small language models (SLMs)
  • Code models
  • Multimodal models
  • Model deployment concepts
  • Model consumption patterns
  • API-based model access
  • Endpoint configuration
  • Performance and cost tradeoffs
  • Model selection strategies
  • Responsible AI considerations

What Are Large Language Models (LLMs)?

Large language models are advanced AI systems trained on massive datasets.

LLMs can:

  • Generate text
  • Summarize documents
  • Answer questions
  • Translate languages
  • Reason across prompts
  • Support conversational AI

Common LLM Use Cases

Typical use cases include:

  • AI assistants
  • Enterprise chatbots
  • Content generation
  • Knowledge retrieval
  • Agent orchestration
  • Workflow automation

Characteristics of LLMs

LLMs typically provide:

  • Strong reasoning
  • Broad general knowledge
  • Advanced conversational abilities
  • Complex instruction following

However, they also:

  • Require more compute
  • Cost more to run
  • May introduce higher latency

What Are Small Language Models (SLMs)?

Small language models are lightweight models optimized for:

  • Faster inference
  • Lower cost
  • Lower latency
  • Edge deployment
  • Specialized tasks

Common SLM Use Cases

SLMs are often used for:

  • Classification
  • Simple chatbots
  • Mobile applications
  • Embedded AI
  • Lightweight assistants

Benefits of Small Models

Advantages include:

  • Reduced infrastructure cost
  • Faster response times
  • Lower resource requirements
  • Easier deployment at scale

LLM vs SLM Tradeoffs

LLMs

Best for:

  • Complex reasoning
  • Broad knowledge
  • Multi-step tasks

Tradeoffs:

  • Higher cost
  • Higher latency
  • Larger infrastructure requirements

SLMs

Best for:

  • Lightweight inference
  • Narrow tasks
  • Cost-sensitive workloads

Tradeoffs:

  • Reduced reasoning capability
  • Smaller context windows
  • Less flexibility

What Are Code Models?

Code models are specialized AI models trained for software development tasks.

These models can:

  • Generate code
  • Explain code
  • Complete functions
  • Debug issues
  • Convert between languages

Common Code Model Use Cases

Typical scenarios include:

  • Developer copilots
  • Code generation
  • Documentation generation
  • Test generation
  • Refactoring assistance

Code Model Capabilities

Code models often support:

  • Multiple programming languages
  • Natural language prompts
  • Code reasoning
  • Syntax understanding

What Are Multimodal Models?

Multimodal models process multiple types of input.

Examples include:

  • Text and images
  • Text and audio
  • Video and text

Multimodal AI Capabilities

Multimodal models may support:

  • Image understanding
  • OCR
  • Visual question answering
  • Audio transcription
  • Speech interaction
  • Video analysis

Common Multimodal Use Cases

Examples include:

  • AI vision assistants
  • Document understanding
  • Medical imaging analysis
  • Voice assistants
  • Image captioning

Model Deployment in Azure AI Foundry

Azure AI Foundry enables developers to:

  • Discover models
  • Deploy models
  • Test models
  • Monitor deployments
  • Consume models through APIs

Model Catalogs

Azure AI Foundry provides access to:

  • Foundation models
  • Open-source models
  • Specialized models
  • Multimodal models

Deployment Concepts

A deployment makes a model available through:

  • APIs
  • Endpoints
  • Applications
  • Agent workflows

Deployment Types

Common deployment options include:

  • Managed online deployments
  • Serverless deployments
  • Real-time inference endpoints
  • Batch inference deployments

Real-Time Inference

Real-time inference is used for:

  • Interactive chat
  • AI assistants
  • Live applications
  • Agent workflows

Batch Inference

Batch inference is used for:

  • Large-scale document processing
  • Offline analysis
  • Scheduled workloads
  • Bulk content generation

Endpoint Configuration

Deployments expose endpoints for application access.

Endpoints may include:

  • Authentication
  • Rate limits
  • Scaling policies
  • Monitoring settings

Authentication and Authorization

Applications may access models using:

  • API keys
  • Managed identities
  • Microsoft Entra ID
  • Role-based access control (RBAC)

Consuming Models Through APIs

Applications consume deployed models using:

  • REST APIs
  • SDKs
  • Client libraries

Prompt-Based Interactions

Generative AI applications commonly interact with models through prompts.

Prompts may include:

  • Instructions
  • Context
  • Examples
  • Retrieved documents

System Prompts

System prompts define:

  • AI behavior
  • Tone
  • Constraints
  • Safety policies

Model Parameters

Common inference parameters include:

  • Temperature
  • Top-p
  • Max tokens
  • Frequency penalty
  • Presence penalty

Temperature

Temperature controls output randomness.

Lower temperature:

  • More deterministic
  • More predictable

Higher temperature:

  • More creative
  • More variable

Context Windows

Context windows determine how much information a model can process in a request.

Larger context windows support:

  • Long conversations
  • Large documents
  • Multi-document grounding

Streaming Responses

Streaming enables applications to receive responses incrementally.

Benefits include:

  • Improved user experience
  • Faster perceived response times

Grounding Models

Grounding improves factual accuracy by providing trusted data.

Grounded applications commonly use:

  • Vector search
  • Retrieval-Augmented Generation (RAG)
  • Enterprise knowledge sources

Model Selection Considerations

Developers should evaluate:

  • Accuracy
  • Cost
  • Latency
  • Context size
  • Reasoning ability
  • Multimodal support
  • Scalability

Choosing Between Models

Use LLMs When:

  • Complex reasoning is required
  • Broad knowledge is needed
  • Multi-step workflows are involved

Use SLMs When:

  • Low latency matters
  • Cost optimization is critical
  • Tasks are narrow or repetitive

Use Code Models When:

  • Building developer tools
  • Generating code
  • Supporting programming workflows

Use Multimodal Models When:

  • Images or audio are required
  • Visual understanding is needed
  • Mixed media inputs are processed

Scaling Model Deployments

Scaling strategies may include:

  • Autoscaling
  • Regional deployments
  • Load balancing
  • Rate limiting

Monitoring Deployments

Organizations should monitor:

  • Latency
  • Throughput
  • Token usage
  • Errors
  • Safety events
  • Cost

Cost Optimization

Cost optimization strategies include:

  • Choosing smaller models
  • Limiting token usage
  • Caching responses
  • Using batch processing

Responsible AI Considerations

Developers should implement:

  • Safety filters
  • Guardrails
  • Content moderation
  • Monitoring
  • Human oversight

Multimodal Safety Concerns

Multimodal systems may require:

  • Image moderation
  • OCR filtering
  • Audio moderation
  • Content safety evaluation

Agentic AI and Model Consumption

AI agents may use:

  • LLMs for reasoning
  • SLMs for lightweight tasks
  • Code models for automation
  • Multimodal models for perception

Common AI-103 Deployment Scenarios

Scenario 1: Enterprise Chatbot

Requirements:

  • Strong reasoning
  • Long conversations
  • Grounded responses

Recommended Model:

  • LLM with RAG

Scenario 2: Mobile AI Assistant

Requirements:

  • Fast responses
  • Low cost
  • Lightweight inference

Recommended Model:

  • Small language model

Scenario 3: Developer Copilot

Requirements:

  • Code generation
  • Programming assistance
  • Syntax awareness

Recommended Model:

  • Code model

Scenario 4: Image-Aware AI Assistant

Requirements:

  • Image analysis
  • OCR
  • Text generation

Recommended Model:

  • Multimodal model

Common AI-103 Exam Tips

Understand Model Categories

Know the differences between:

  • LLMs
  • SLMs
  • Code models
  • Multimodal models

Learn Deployment Concepts

Understand:

  • Endpoints
  • Real-time inference
  • Batch inference
  • Scaling

Learn Consumption Patterns

Know:

  • REST APIs
  • SDKs
  • Prompt engineering
  • System prompts

Understand Cost and Performance Tradeoffs

Know how:

  • Model size affects cost
  • Context size affects latency
  • Scaling impacts performance

Summary

Azure AI Foundry enables developers to deploy and consume a wide range of AI models.

For the AI-103 exam, you should understand:

  • LLMs
  • Small language models
  • Code models
  • Multimodal models
  • Deployment options
  • Model consumption patterns
  • Prompt engineering
  • Scaling strategies
  • Cost optimization
  • Responsible AI controls

Choosing the right model and deployment strategy is essential for building:

  • Scalable
  • Reliable
  • Efficient
  • Responsible AI solutions

These concepts are foundational for generative AI and agentic systems on Azure.


Practice Exam Questions

Question 1

What is a primary strength of large language models (LLMs)?

A. Minimal compute usage
B. Complex reasoning and broad knowledge
C. Guaranteed factual accuracy
D. Extremely low latency

Answer

B. Complex reasoning and broad knowledge

Explanation

LLMs excel at reasoning, conversation, and broad knowledge tasks.


Question 2

Which model type is best suited for lightweight, low-cost inference?

A. Large language model
B. Small language model
C. Multimodal model
D. Vision transformer only

Answer

B. Small language model

Explanation

SLMs are optimized for lower latency and reduced cost.


Question 3

Which model type is specifically optimized for programming tasks?

A. Vision model
B. Code model
C. Embedding model
D. Speech model

Answer

B. Code model

Explanation

Code models are trained for software development workflows.


Question 4

What is a defining feature of multimodal models?

A. They only process text
B. They process multiple input types
C. They eliminate inference costs
D. They require no prompting

Answer

B. They process multiple input types

Explanation

Multimodal models handle text, images, audio, and other media.


Question 5

Which deployment type is best for interactive AI chat applications?

A. Batch inference
B. Real-time inference
C. Archive deployment
D. Offline storage deployment

Answer

B. Real-time inference

Explanation

Interactive applications require low-latency real-time inference.


Question 6

What does the temperature parameter control?

A. Network throughput
B. Output randomness and creativity
C. Storage replication
D. GPU memory allocation

Answer

B. Output randomness and creativity

Explanation

Temperature affects how deterministic or creative outputs become.


Question 7

Which technique improves factual accuracy by using trusted data sources?

A. GPU scaling
B. Retrieval-Augmented Generation (RAG)
C. Semantic caching
D. Compression indexing

Answer

B. Retrieval-Augmented Generation (RAG)

Explanation

RAG grounds model outputs using retrieved enterprise data.


Question 8

What is a major benefit of streaming responses?

A. Reduced storage costs
B. Faster perceived response times
C. Elimination of monitoring
D. Improved vector indexing

Answer

B. Faster perceived response times

Explanation

Streaming improves user experience during response generation.


Question 9

Which authentication method supports passwordless access to Azure AI services?

A. Static credentials only
B. Managed identities
C. Anonymous access
D. Embedded API secrets in code

Answer

B. Managed identities

Explanation

Managed identities support secure, keyless authentication.


Question 10

Which model type is most appropriate for image understanding and OCR tasks?

A. Small language model
B. Multimodal model
C. Traditional relational database
D. Static rules engine

Answer

B. Multimodal model

Explanation

Multimodal models process images and text together.


Go to the AI-103 Exam Prep Hub main page

Choose an appropriate model for each task, including large language models (LLMs), small language models, multimodal models, and Foundry Tools (AI-103 Exam Prep)

This post is a part of the AI-103: Develop AI Apps and Agents on Azure Exam Prep Hub. 
This topic falls under these sections:
Plan and manage an Azure AI solution (25–30%)
--> Choose the appropriate Foundry services for generative AI and agents
--> Choose an appropriate model for each task, including large language models (LLMs), small language models, multimodal models, and Foundry Tools


Note that there are 10 practice questions (with answers and explanations) at the end of each section to help you solidify your knowledge of the material. Also, there are 2 practice tests with 60 questions each available from the hub's main page below the exam topics section.

Introduction

One of the most important skills for the AI-103: Develop AI Apps and Agents on Azure certification exam is understanding how to choose the correct AI model and supporting Azure AI Foundry tools for a given business or technical scenario.

Modern AI development is no longer about simply selecting “an AI model.” Instead, developers must evaluate:

  • The type of task being performed
  • Cost constraints
  • Latency requirements
  • Accuracy expectations
  • Reasoning complexity
  • Context window needs
  • Multimodal capabilities
  • Deployment environment
  • Security and governance requirements
  • Agent orchestration requirements

Azure AI Foundry provides access to multiple categories of models and tools that help developers build generative AI applications and AI agents efficiently.

For the AI-103 exam, you should understand:

  • When to use Large Language Models (LLMs)
  • When Small Language Models (SLMs) are preferable
  • When multimodal models are required
  • How Azure AI Foundry tools support model selection and orchestration
  • Tradeoffs between performance, cost, speed, and capability
  • Common real-world scenarios for each model category

Azure AI Foundry Overview

Azure AI Foundry is Microsoft’s unified platform for building, evaluating, deploying, and managing AI applications and agents.

Azure AI Foundry provides:

  • Access to foundation models
  • Agent development capabilities
  • Prompt engineering tools
  • Evaluation tools
  • Safety and content filtering
  • Retrieval-augmented generation (RAG) support
  • Fine-tuning capabilities
  • Monitoring and observability
  • Integration with Azure AI services

Azure AI Foundry enables developers to:

  • Compare multiple models
  • Test prompts
  • Evaluate outputs
  • Build AI agents
  • Connect enterprise data
  • Deploy scalable AI applications

For the AI-103 exam, understanding the relationship between model capabilities and Azure AI Foundry tools is extremely important.


Understanding Model Categories

The exam focuses heavily on selecting the correct model type for specific tasks.

The major categories include:

  1. Large Language Models (LLMs)
  2. Small Language Models (SLMs)
  3. Multimodal Models
  4. Embedding Models
  5. Specialized Models

Each category serves different purposes.


Large Language Models (LLMs)

What Are Large Language Models?

Large Language Models are advanced AI models trained on massive datasets containing text, code, and other information.

LLMs are designed for:

  • Natural language understanding
  • Natural language generation
  • Complex reasoning
  • Summarization
  • Coding assistance
  • Question answering
  • Conversational AI
  • Agent workflows
  • Content creation

Examples include:

  • GPT-4 family models
  • GPT-4o models
  • GPT-4 Turbo
  • Phi large models
  • Other frontier foundation models available in Azure AI Foundry

Characteristics of LLMs

Strengths

LLMs are excellent at:

Complex Reasoning

Examples:

  • Multi-step problem solving
  • Data interpretation
  • Logical analysis
  • Decision support

Advanced Content Generation

Examples:

  • Marketing content
  • Technical documentation
  • Email drafting
  • Knowledge-base generation

Conversational Experiences

Examples:

  • AI chatbots
  • AI copilots
  • Virtual assistants
  • Interactive tutoring systems

Agentic Workflows

LLMs are commonly used as the “reasoning engine” behind AI agents.

They can:

  • Plan tasks
  • Determine next actions
  • Call tools
  • Use memory
  • Chain workflows
  • Interact with APIs

Limitations of LLMs

Although powerful, LLMs have tradeoffs.

Higher Cost

LLMs generally:

  • Require more compute
  • Cost more per token
  • Increase infrastructure expenses

Increased Latency

Larger models may:

  • Respond more slowly
  • Increase application response times
  • Affect real-time user experiences

Resource Requirements

LLMs require:

  • More GPU resources
  • More memory
  • Larger deployments

Overkill for Simple Tasks

Using GPT-4-level reasoning for basic classification or short summarization tasks may be unnecessary and expensive.


When to Use LLMs

Choose an LLM when tasks require:

  • Advanced reasoning
  • Long-context understanding
  • High-quality content generation
  • Complex conversational behavior
  • Tool calling and agent orchestration
  • Coding assistance
  • Sophisticated summarization
  • Enterprise copilots

Example LLM Scenarios

Scenario 1: Enterprise AI Copilot

A company wants an AI assistant that:

  • Reads internal documentation
  • Answers employee questions
  • Generates summaries
  • Explains policies
  • Uses tools and APIs

Best choice:

  • Large Language Model with RAG integration

Reason:

  • Requires reasoning and conversational understanding.

Scenario 2: AI Coding Assistant

A development team needs:

  • Code generation
  • Debugging suggestions
  • Refactoring support
  • Documentation generation

Best choice:

  • Advanced LLM

Reason:

  • Coding tasks require complex contextual reasoning.

Small Language Models (SLMs)

What Are Small Language Models?

Small Language Models are more lightweight AI models optimized for:

  • Faster responses
  • Lower costs
  • Lower resource consumption
  • Edge deployments
  • Narrower tasks

Examples include:

  • Smaller Phi models
  • Compact transformer-based models
  • Task-specific lightweight models

Characteristics of SLMs

Strengths

Lower Cost

SLMs:

  • Consume fewer resources
  • Cost less to run
  • Reduce token usage costs

Faster Inference

SLMs typically:

  • Respond more quickly
  • Improve responsiveness
  • Support near real-time interactions

Edge and Mobile Suitability

SLMs may run:

  • On edge devices
  • On mobile hardware
  • In constrained environments

Efficient for Narrow Tasks

SLMs work well for:

  • Classification
  • Basic summarization
  • Intent detection
  • Simple chat interactions
  • Lightweight automation

Limitations of SLMs

Reduced Reasoning Ability

Compared to LLMs, SLMs may struggle with:

  • Complex logic
  • Long context handling
  • Multi-step reasoning
  • Sophisticated conversations

Lower Output Quality

Outputs may:

  • Be less nuanced
  • Contain reduced detail
  • Provide weaker contextual understanding

When to Use SLMs

Choose an SLM when:

  • Speed is critical
  • Cost optimization matters
  • Tasks are relatively simple
  • Edge deployment is needed
  • High throughput is required
  • Lightweight AI experiences are sufficient

Example SLM Scenarios

Scenario 1: Customer Intent Classification

An application classifies support tickets into categories such as:

  • Billing
  • Technical support
  • Returns
  • Sales

Best choice:

  • Small Language Model

Reason:

  • Classification is relatively simple and does not require advanced reasoning.

Scenario 2: Edge Device Assistant

A manufacturing company deploys an AI assistant on factory equipment with limited compute.

Best choice:

  • Small Language Model

Reason:

  • Edge environments benefit from lightweight models.

Multimodal Models

What Are Multimodal Models?

Multimodal models can process multiple data types simultaneously.

Examples include:

  • Text
  • Images
  • Audio
  • Video
  • Documents

These models combine information across modalities to produce richer outputs.


Capabilities of Multimodal Models

Multimodal models can:

  • Analyze images and answer questions about them
  • Generate captions from images
  • Extract information from documents
  • Process speech and text together
  • Understand charts and diagrams
  • Support visual reasoning

Common Multimodal Tasks

Image Understanding

Examples:

  • Object detection
  • Scene analysis
  • Image captioning
  • Visual question answering

Document Intelligence

Examples:

  • Invoice extraction
  • Receipt processing
  • Form analysis
  • OCR workflows

Audio + Text Experiences

Examples:

  • Voice assistants
  • Meeting summarization
  • Speech transcription
  • Audio analysis

When to Use Multimodal Models

Choose multimodal models when applications involve:

  • Images and text together
  • Document processing
  • Speech interactions
  • Visual understanding
  • Cross-modal reasoning

Example Multimodal Scenarios

Scenario 1: Invoice Processing

A company needs to:

  • Read invoices
  • Extract totals
  • Identify vendors
  • Validate line items

Best choice:

  • Multimodal document processing model

Reason:

  • The solution must interpret both layout and text.

Scenario 2: Retail Image Assistant

Users upload photos of products and ask questions about them.

Best choice:

  • Multimodal model

Reason:

  • Requires simultaneous image and text understanding.

Embedding Models

What Are Embedding Models?

Embedding models convert text or other content into vector representations.

These vectors capture semantic meaning.

Embedding models are essential for:

  • Semantic search
  • Retrieval-Augmented Generation (RAG)
  • Similarity matching
  • Recommendation systems
  • Knowledge retrieval

Retrieval-Augmented Generation (RAG)

RAG combines:

  • Embedding models
  • Vector databases
  • LLMs

Workflow:

  1. Convert documents into embeddings
  2. Store embeddings in a vector index
  3. Convert user query into embeddings
  4. Retrieve relevant content
  5. Send retrieved data to the LLM

RAG improves:

  • Accuracy
  • Freshness of information
  • Enterprise grounding
  • Hallucination reduction

Specialized Models

Some tasks are better handled by specialized AI models instead of general-purpose LLMs.

Examples:

  • Translation models
  • Speech models
  • OCR models
  • Vision models
  • Classification models

Why Specialized Models Matter

Specialized models may provide:

  • Better accuracy
  • Lower cost
  • Faster performance
  • Simpler deployment

Example:

Using a dedicated OCR service is often more efficient than asking an LLM to read text from images.


Model Selection Factors

The AI-103 exam heavily tests your ability to select the correct model based on requirements.


Factor 1: Task Complexity

Use LLMs For:

  • Advanced reasoning
  • Multi-step workflows
  • Complex conversations

Use SLMs For:

  • Simple classification
  • Lightweight interactions
  • Fast automation

Factor 2: Cost

LLMs

  • Higher operational cost
  • More expensive inference

SLMs

  • Lower operational cost
  • Better for high-volume workloads

Factor 3: Latency

Low-Latency Requirements

Prefer:

  • SLMs
  • Lightweight models

Complex Processing

Prefer:

  • LLMs

Even if response time increases.


Factor 4: Context Window

Some tasks require processing:

  • Long documents
  • Large conversations
  • Extensive histories

Choose models with larger context windows for:

  • Legal analysis
  • Knowledge assistants
  • Long-form summarization

Factor 5: Multimodal Requirements

If the application involves:

  • Images
  • Audio
  • Video
  • Documents

Choose multimodal-capable models.


Factor 6: Deployment Environment

Cloud-Hosted Applications

May use:

  • Large frontier models
  • GPU-intensive deployments

Edge or Mobile Deployments

Prefer:

  • Small models
  • Quantized models
  • Lightweight inference

Azure AI Foundry Tools

Azure AI Foundry includes numerous tools that support model selection and AI application development.


Model Catalog

The Model Catalog allows developers to:

  • Browse available models
  • Compare capabilities
  • Review benchmarks
  • Deploy models
  • Evaluate pricing

The catalog includes:

  • Microsoft-hosted models
  • Open-source models
  • Partner models
  • Frontier models

Prompt Flow

Prompt Flow helps developers:

  • Build AI workflows
  • Chain prompts together
  • Integrate tools
  • Evaluate prompts
  • Test model behavior

Prompt Flow is useful for:

  • Agent orchestration
  • RAG pipelines
  • Multi-step AI workflows

AI Agent Development Tools

Azure AI Foundry supports AI agents that can:

  • Use tools
  • Access data
  • Maintain memory
  • Perform actions
  • Execute workflows

Agent frameworks may include:

  • Tool calling
  • Function calling
  • Retrieval integration
  • Multi-agent orchestration

Evaluation Tools

Evaluation tools help developers assess:

  • Accuracy
  • Groundedness
  • Safety
  • Relevance
  • Latency
  • Cost

Evaluation is critical because model quality varies by task.


Content Safety Tools

Azure AI Foundry includes safety features such as:

  • Content filtering
  • Harm detection
  • Prompt injection detection
  • Responsible AI controls

These tools help ensure safe AI deployments.


Fine-Tuning Tools

Fine-tuning allows developers to customize models using:

  • Domain-specific data
  • Proprietary terminology
  • Specialized workflows

Fine-tuning may improve:

  • Accuracy
  • Consistency
  • Industry-specific responses

However, fine-tuning also:

  • Increases cost
  • Requires data preparation
  • Adds operational complexity

Choosing Between Prompt Engineering, RAG, and Fine-Tuning

This is a very important AI-103 exam topic.


Prompt Engineering

Use when:

  • You need quick customization
  • Tasks are general-purpose
  • No private data integration is needed

Advantages:

  • Fast
  • Cheap
  • Easy to maintain

RAG

Use when:

  • You need current or proprietary data
  • You want grounding in enterprise content
  • You need dynamic knowledge retrieval

Advantages:

  • Reduces hallucinations
  • Keeps knowledge current
  • Avoids retraining

Fine-Tuning

Use when:

  • Consistent specialized outputs are required
  • Domain language is highly unique
  • Behavioral customization is necessary

Advantages:

  • Tailored responses
  • Better domain alignment

Real-World Model Selection Examples

Example 1: FAQ Chatbot

Requirements:

  • Low cost
  • Fast responses
  • Basic conversational support

Best Choice:

  • Small Language Model + RAG

Example 2: Legal Document Assistant

Requirements:

  • Long-context understanding
  • Detailed summarization
  • Advanced reasoning

Best Choice:

  • Large Language Model with large context window

Example 3: Mobile AI App

Requirements:

  • Offline capability
  • Fast performance
  • Low resource usage

Best Choice:

  • Small Language Model

Example 4: Image-Based Customer Support

Requirements:

  • Analyze uploaded photos
  • Understand text and images
  • Generate responses

Best Choice:

  • Multimodal model

Key AI-103 Exam Tips

Understand Tradeoffs

You should know:

  • Bigger models are not always better
  • Simpler tasks may not require advanced LLMs
  • Cost and latency matter
  • Specialized models may outperform general models

Know Common Pairings

LLM + RAG

Used for:

  • Enterprise chatbots
  • Knowledge assistants
  • AI copilots

Embeddings + Vector Search

Used for:

  • Semantic search
  • Knowledge retrieval
  • Similarity matching

Multimodal Models

Used for:

  • Vision AI
  • Document processing
  • Audio interactions

Learn the Azure AI Foundry Ecosystem

Know the purpose of:

  • Model Catalog
  • Prompt Flow
  • Evaluation tools
  • Agent tools
  • Safety systems
  • Fine-tuning workflows

Summary

Selecting the correct AI model is one of the most important responsibilities for an Azure AI developer.

For the AI-103 exam, you should understand:

  • The differences between LLMs and SLMs
  • When multimodal models are required
  • How embedding models support RAG
  • When specialized models outperform general-purpose models
  • The tradeoffs between cost, speed, and reasoning capability
  • How Azure AI Foundry tools support AI development and orchestration

In real-world AI systems, choosing the correct model can dramatically improve:

  • Performance
  • User experience
  • Scalability
  • Operational cost
  • Reliability
  • Maintainability

A strong understanding of model selection is essential for designing effective Azure AI applications and AI agents.


Practice Exam Questions

Question 1

A company is building an enterprise AI assistant that must answer complex employee questions using internal documentation and perform multi-step reasoning. Which model type is MOST appropriate?

A. Small Language Model (SLM)
B. Embedding model only
C. Large Language Model (LLM)
D. OCR model

Answer

C. Large Language Model (LLM)

Explanation

Complex reasoning and conversational understanding are best handled by LLMs.


Question 2

Which model type is generally BEST for low-cost, low-latency classification tasks?

A. Large multimodal model
B. Small Language Model (SLM)
C. GPT-4-class reasoning model
D. Vision foundation model

Answer

B. Small Language Model (SLM)

Explanation

SLMs are optimized for lightweight and cost-efficient tasks.


Question 3

A solution must process uploaded invoices and extract totals, vendor names, and line items. Which model type is MOST appropriate?

A. Embedding model
B. Small Language Model
C. Multimodal model
D. Translation model

Answer

C. Multimodal model

Explanation

Invoice extraction requires understanding both layout and text.


Question 4

What is the primary purpose of embedding models?

A. Image generation
B. Semantic vector representation
C. Audio transcription
D. Tool orchestration

Answer

B. Semantic vector representation

Explanation

Embedding models convert content into vectors for semantic search and retrieval.


Question 5

Which Azure AI Foundry tool helps developers chain prompts, integrate tools, and build AI workflows?

A. Azure Monitor
B. Prompt Flow
C. Azure Policy
D. Azure Functions

Answer

B. Prompt Flow

Explanation

Prompt Flow is designed for workflow orchestration and prompt pipelines.


Question 6

A mobile AI application must operate with minimal compute resources and very fast response times. Which model type is MOST appropriate?

A. Large Language Model
B. Small Language Model
C. Large multimodal model
D. High-context reasoning model

Answer

B. Small Language Model

Explanation

SLMs are optimized for lightweight and edge deployments.


Question 7

Which approach is BEST when an AI chatbot must use current enterprise data without retraining the model?

A. Fine-tuning only
B. Prompt engineering only
C. Retrieval-Augmented Generation (RAG)
D. Quantization

Answer

C. Retrieval-Augmented Generation (RAG)

Explanation

RAG retrieves current information dynamically without retraining.


Question 8

Which factor MOST strongly indicates that a multimodal model is required?

A. Need for vector embeddings
B. Need for faster response times
C. Need to process images and text together
D. Need for lower cost

Answer

C. Need to process images and text together

Explanation

Multimodal models handle multiple input modalities simultaneously.


Question 9

What is a major tradeoff of using larger language models?

A. Reduced reasoning capability
B. Lower context windows
C. Increased operational cost
D. Inability to support agents

Answer

C. Increased operational cost

Explanation

Larger models typically require more compute resources and cost more.


Question 10

Which Azure AI Foundry capability helps evaluate model quality, safety, and groundedness?

A. Azure Load Balancer
B. Evaluation tools
C. Azure Backup
D. Traffic Manager

Answer

B. Evaluation tools

Explanation

Evaluation tools assess output quality, safety, and performance metrics.


Go to the AI-103 Exam Prep Hub main page

Describe Features and Capabilities of Azure OpenAI Service (AI-900 Exam Prep)

Overview

The Azure OpenAI Service provides access to powerful OpenAI large language models (LLMs)—such as GPT models—directly within the Microsoft Azure cloud environment. It enables organizations to build generative AI applications while benefiting from Azure’s security, compliance, governance, and enterprise integration capabilities.

For the AI-900 exam, Azure OpenAI is positioned as Microsoft’s primary service for generative AI workloads, especially those involving text, code, and conversational AI.


What Is Azure OpenAI Service?

Azure OpenAI Service allows developers to deploy, customize, and consume OpenAI models using Azure-native tooling, APIs, and security controls.

Key characteristics:

  • Hosted and managed by Microsoft Azure
  • Provides enterprise-grade security and compliance
  • Uses REST APIs and SDKs
  • Integrates seamlessly with other Azure services

👉 On the exam, Azure OpenAI is the correct answer when a scenario describes generative AI powered by large language models.


Core Capabilities of Azure OpenAI Service

1. Access to Large Language Models (LLMs)

Azure OpenAI provides access to advanced models such as:

  • GPT models for text generation and understanding
  • Chat models for conversational AI
  • Embedding models for semantic search and retrieval
  • Code-focused models for programming assistance

These models can:

  • Generate human-like text
  • Answer questions
  • Summarize content
  • Write code
  • Explain concepts
  • Generate creative content

2. Text and Content Generation

Azure OpenAI can generate:

  • Articles, emails, and reports
  • Chatbot responses
  • Marketing copy
  • Knowledge base answers
  • Product descriptions

Exam tip:
If the question mentions writing, summarizing, or generating text, Azure OpenAI is likely the answer.


3. Conversational AI (Chatbots)

Azure OpenAI supports natural, multi-turn conversations, making it ideal for:

  • Customer support chatbots
  • Virtual assistants
  • Internal helpdesk bots
  • AI copilots

These chatbots:

  • Maintain conversation context
  • Generate natural responses
  • Can be grounded in enterprise data

4. Code Generation and Assistance

Azure OpenAI can:

  • Generate code snippets
  • Explain existing code
  • Translate code between languages
  • Assist with debugging

This makes it valuable for developer productivity tools and AI-assisted coding scenarios.


5. Embeddings and Semantic Search

Azure OpenAI can create vector embeddings that represent the meaning of text.

Use cases include:

  • Semantic search
  • Document similarity
  • Recommendation systems
  • Retrieval-augmented generation (RAG)

Exam tip:
If the scenario mentions searching based on meaning rather than keywords, think embeddings + Azure OpenAI.


6. Enterprise Security and Compliance

One of the most important exam points:

Azure OpenAI provides:

  • Data isolation
  • No training on customer data
  • Azure Active Directory integration
  • Role-Based Access Control (RBAC)
  • Compliance with Microsoft standards

This makes it suitable for regulated industries.


7. Integration with Azure Services

Azure OpenAI integrates with:

  • Azure AI Foundry
  • Azure AI Search
  • Azure Machine Learning
  • Azure App Service
  • Azure Functions
  • Azure Logic Apps

This allows organizations to build end-to-end generative AI solutions within Azure.


Common Use Cases Tested on AI-900

You should associate Azure OpenAI with:

  • Chatbots and conversational agents
  • Text generation and summarization
  • AI copilots
  • Semantic search
  • Code generation
  • Enterprise generative AI solutions

Azure OpenAI vs Other Azure AI Services (Exam Perspective)

ServicePrimary Focus
Azure OpenAIGenerative AI using large language models
Azure AI LanguageTraditional NLP (sentiment, entities, key phrases)
Azure AI VisionImage analysis and OCR
Azure AI SpeechSpeech-to-text and text-to-speech
Azure AI FoundryEnd-to-end generative AI app lifecycle

Key Exam Takeaways

For AI-900, remember:

  • Azure OpenAI = Generative AI
  • Best for text, chat, code, and embeddings
  • Enterprise-ready with security and compliance
  • Uses pre-trained OpenAI models
  • Integrates with the broader Azure ecosystem

One-Line Exam Rule

If the question describes generating new content using large language models in Azure, the answer is likely related to Azure OpenAI Service.


Go to the Practice Exam Questions for this topic.

Go to the AI-900 Exam Prep Hub main page.

AI in Cybersecurity: From Reactive Defense to Adaptive, Autonomous Protection

“AI in …” series

Cybersecurity has always been a race between attackers and defenders. What’s changed is the speed, scale, and sophistication of threats. Cloud computing, remote work, IoT, and AI-generated attacks have dramatically expanded the attack surface—far beyond what human analysts alone can manage.

AI has become a foundational capability in cybersecurity, enabling organizations to detect threats faster, respond automatically, and continuously adapt to new attack patterns.


How AI Is Being Used in Cybersecurity Today

AI is now embedded across nearly every cybersecurity function:

Threat Detection & Anomaly Detection

  • Darktrace uses self-learning AI to model “normal” behavior across networks and detect anomalies in real time.
  • Vectra AI applies machine learning to identify hidden attacker behaviors in network and identity data.

Endpoint Protection & Malware Detection

  • CrowdStrike Falcon uses AI and behavioral analytics to detect malware and fileless attacks on endpoints.
  • Microsoft Defender for Endpoint applies ML models trained on trillions of signals to identify emerging threats.

Security Operations (SOC) Automation

  • Palo Alto Networks Cortex XSIAM uses AI to correlate alerts, reduce noise, and automate incident response.
  • Splunk AI Assistant helps analysts investigate incidents faster using natural language queries.

Phishing & Social Engineering Defense

  • Proofpoint and Abnormal Security use AI to analyze email content, sender behavior, and context to stop phishing and business email compromise (BEC).

Identity & Access Security

  • Okta and Microsoft Entra ID use AI to detect anomalous login behavior and enforce adaptive authentication.
  • AI flags compromised credentials and impossible travel scenarios.

Vulnerability Management

  • Tenable and Qualys use AI to prioritize vulnerabilities based on exploit likelihood and business impact rather than raw CVSS scores.

Tools, Technologies, and Forms of AI in Use

Cybersecurity AI blends multiple techniques into layered defenses:

  • Machine Learning (Supervised & Unsupervised)
    Used for classification (malware vs. benign) and anomaly detection.
  • Behavioral Analytics
    AI models baseline normal user, device, and network behavior to detect deviations.
  • Natural Language Processing (NLP)
    Used to analyze phishing emails, threat intelligence reports, and security logs.
  • Generative AI & Large Language Models (LLMs)
    • Used defensively as SOC copilots, investigation assistants, and policy generators
    • Examples: Microsoft Security Copilot, Google Chronicle AI, Palo Alto Cortex Copilot
  • Graph AI
    Maps relationships between users, devices, identities, and events to identify attack paths.
  • Security AI Platforms
    • Microsoft Security Copilot
    • IBM QRadar Advisor with Watson
    • Google Chronicle
    • AWS GuardDuty

Benefits Organizations Are Realizing

Companies using AI-driven cybersecurity report major advantages:

  • Faster Threat Detection (minutes instead of days or weeks)
  • Reduced Alert Fatigue through intelligent correlation
  • Lower Mean Time to Respond (MTTR)
  • Improved Detection of Zero-Day and Unknown Threats
  • More Efficient SOC Operations with fewer analysts
  • Scalability across hybrid and multi-cloud environments

In a world where attackers automate their attacks, AI is often the only way defenders can keep pace.


Pitfalls and Challenges

Despite its power, AI in cybersecurity comes with real risks:

False Positives and False Confidence

  • Poorly trained models can overwhelm teams or miss subtle attacks.

Bias and Blind Spots

  • AI trained on incomplete or biased data may fail to detect novel attack patterns or underrepresent certain environments.

Explainability Issues

  • Security teams and auditors need to understand why an alert fired—black-box models can erode trust.

AI Used by Attackers

  • Generative AI is being used to create more convincing phishing emails, deepfake voice attacks, and automated malware.

Over-Automation Risks

  • Fully automated response without human oversight can unintentionally disrupt business operations.

Where AI Is Headed in Cybersecurity

The future of AI in cybersecurity is increasingly autonomous and proactive:

  • Autonomous SOCs
    AI systems that investigate, triage, and respond to incidents with minimal human intervention.
  • Predictive Security
    Models that anticipate attacks before they occur by analyzing attacker behavior trends.
  • AI vs. AI Security Battles
    Defensive AI systems dynamically adapting to attacker AI in real time.
  • Deeper Identity-Centric Security
    AI focusing more on identity, access patterns, and behavioral trust rather than perimeter defense.
  • Generative AI as a Security Teammate
    Natural language interfaces for investigations, playbooks, compliance, and training.

How Organizations Can Gain an Advantage

To succeed in this fast-changing environment, organizations should:

  1. Treat AI as a Force Multiplier, Not a Replacement
    Human expertise remains essential for context and judgment.
  2. Invest in High-Quality Telemetry
    Better data leads to better detection—logs, identity signals, and endpoint visibility matter.
  3. Focus on Explainable and Governed AI
    Transparency builds trust with analysts, leadership, and regulators.
  4. Prepare for AI-Powered Attacks
    Assume attackers are already using AI—and design defenses accordingly.
  5. Upskill Security Teams
    Analysts who understand AI can tune models and use copilots more effectively.
  6. Adopt a Platform Strategy
    Integrated AI platforms reduce complexity and improve signal correlation.

Final Thoughts

AI has shifted cybersecurity from a reactive, alert-driven discipline into an adaptive, intelligence-led function. As attackers scale their operations with automation and generative AI, defenders have little choice but to do the same—responsibly and strategically.

In cybersecurity, AI isn’t just improving defense—it’s redefining what defense looks like in the first place.

The State of Data for the Year 2025

As we close out 2025, it’s clear that the global data landscape has continued its unprecedented expansion — touching every part of life, business, and technology. From raw bytes generated every second to the ways that AI reshapes how we search, communicate, and innovate, this year has marked another seismic leap forward for data. Below is a comprehensive look at where we stand — and where things appear to be headed as we approach 2026.


🌐 Global Data Generation: A Tidal Wave

Amount of Data Generated

  • In 2025, the total volume of data created, captured, copied, and consumed globally is forecast to reach approximately 181 zettabytes (ZB) — up from about 147 ZB in 2024, representing roughly 23% year-over-year growth. Gitnux+1
  • That equates to an astonishing ~402 million terabytes of data generated daily. Exploding Topics

Growth Comparison: 2024 vs 2025

  • Data is growing at a compound rate: from roughly 120 ZB in 2023 to 147 ZB in 2024, then to about 181 ZB in 2025 — illustrating an ongoing surge of data creation driven by digital adoption and connected devices. Exploding Topics+1

🔍 Internet Users & Search Behavior

Number of People Online

  • As of early 2025, around 5.56 billion people are active internet users, accounting for nearly 68% of the global population — up from approximately 5.43 billion in 2024. DemandSage

Search Engine Activity

  • Google alone handles roughly 13.6 billion searches per day in 2025, totaling almost 5 trillion searches annually — a significant increase from the estimated 8.3 billion daily searches in 2024. Exploding Topics
  • Bing, while much smaller in scale, processes around 450+ million searches per day (~13–14 billion per month). Nerdynav

Market Share Snapshot

  • Google continues to dominate search with approximately 90% global market share, while Bing remains one of the top alternatives. StatCounter Global Stats

📱 Social Media Usage & Content Creation

User Numbers

  • There are roughly 5.4–5.45 billion social media users worldwide in 2025 — up from prior years and covering about 65–67% of the global population. XtendedView+1

Time Spent & Trends

  • Users spend on average about 2 hours and 20+ minutes per day on social platforms. SQ Magazine
  • AI plays a central role in content recommendations and creation, with 80%+ of social feeds relying on algorithms, and an increasing share of generated images and posts assisted by AI tools. SQ Magazine

📊 The Explosion of AI: LLMs & Tools

LLM Adoption

  • Large language models and AI assistants like ChatGPT have become globally pervasive:
    • ChatGPT alone has around 800 million weekly active users as of late 2025. First Page Sage
    • Daily usage figures exceed 2.5 billion user prompts globally, highlighting a massive shift toward direct AI interaction. Exploding Topics
  • Studies have shown that LLM-assisted writing and content creation are now embedded across formal and informal communication channels, indicating broad adoption beyond curiosity use cases. arXiv

AI Tools Everywhere

  • Generative AI is now a staple across industries — from content creation to customer service, data analytics to software development. Investments and usage in AI-powered analytics and automation tools continue to rise rapidly. layerai.org

💡 Trends in Data Collection & Analytics

Real-Time & Edge Processing

  • In 2025, more than half of corporate data processing is happening at the edge, closer to the source of data generation, enabling real-time insights. Pennsylvania Institute of Technology

Data Democratization

  • Data access and analytics tools have become more user-friendly, with low-code/no-code platforms enabling broader organizational participation in data insight generation. postlo.com

☁️ Cloud & Data Infrastructure

Cloud Data Growth

  • An ever-increasing portion of global data is stored in the cloud, with estimates suggesting around half of all data resides in cloud environments by 2025. Axis Intelligence

Data Centers & Energy

  • Data centers, particularly those supporting AI workloads, are expanding rapidly. This infrastructure surge is driving both innovation and concerns — including power consumption and sustainability challenges. TIME

📜 Data Laws & Regulation

New Legal Frameworks

  • In the UK, the Data (Use and Access) Act of 2025 was enacted, updating data protection and access rules related to UK-specific GDPR implementations. Wikipedia
  • Elsewhere, data regulation remains a focal point globally, with ongoing debates around privacy, governance, AI accountability, and cross–border data flows.

🛠️ Top Data Tools/Platforms of 2025

While specific rankings vary by industry and use case, 2025’s data ecosystem centers around:

  • Cloud data platforms: Snowflake, BigQuery, Redshift, Databricks
  • BI & visualization: Tableau, Power BI
  • AI/ML frameworks: TensorFlow, PyTorch, scalable LLM platforms
  • Automation & low-code analytics: dbt, Airflow, no-code toolchains
  • Real-time streaming: Kafka, ksqlDB

Ongoing trends emphasize integration between AI tooling and traditional analytics pipelines — blurring the lines between data engineering, analytics, and automation.

Note: specific tool adoption percentages vary by firm size and sector, but cloud-native and AI-augmented tools dominate enterprise workflows. Reddit


🌟 Novel Uses of Data in 2025

2025 saw innovative applications such as:

  • AI-powered disaster response using real-time social data streams.
  • Conversational assistants embedded into everyday workflows (search, writing, decision support).
  • Predictive analytics in health, finance, logistics, accelerated by real-time IoT feeds.
  • Synthetic datasets for simulation, security research, and model training. arXiv

🔮 What’s Expected in 2026

Continued Growth

  • Data volumes are projected to keep rising — potentially doubling every few years with the proliferation of AI, IoT, and immersive technologies.
  • LLM adoption will likely hit deeper integration into enterprise processes, customer experience workflows, and consumer tech.
  • AI governance and data privacy regulation will intensify globally, balancing innovation with accountability.

Emerging Frontiers

  • Multimodal AI blending text, vision, and real-time sensor data.
  • Federated learning and privacy-preserving analytics gaining traction.
  • Data meshes and decentralized data infrastructures challenging traditional monolithic systems.
  • Unified data platforms with AI-focused features and AI-focused business-ready data models are becoming common place.

📌 Final Thoughts

2025 has been another banner year for data — not just in sheer scale, but in how data powers decision-making, AI capabilities, and digital interactions across society. From trillions of searches to billions of social interactions, from zettabytes of oceans of data to democratized analytics tools, the data world continues to evolve at breakneck speed. And for data professionals and leaders, the next year promises even more opportunities to harness data for insight, innovation, and impact. Exciting stuff!

Thanks for reading!

AI in Retail and eCommerce: Personalization at Scale Meets Operational Intelligence

“AI in …” series

Retail and eCommerce sit at the intersection of massive data volume, thin margins, and constantly shifting customer expectations. From predicting what customers want to buy next to optimizing global supply chains, AI has become a core capability—not a nice-to-have—for modern retailers.

What makes retail especially interesting is that AI touches both the customer-facing experience and the operational backbone of the business, often at the same time.


How AI Is Being Used in Retail and eCommerce Today

AI adoption in retail spans the full value chain:

Personalized Recommendations & Search

  • Amazon uses machine learning models to power its recommendation engine, driving a significant portion of total sales through “customers also bought” and personalized homepages.
  • Netflix-style personalization, but for shopping: retailers tailor product listings, pricing, and promotions in real time.

Demand Forecasting & Inventory Optimization

  • Walmart applies AI to forecast demand at the store and SKU level, accounting for seasonality, local events, and weather.
  • Target uses AI-driven forecasting to reduce stockouts and overstocks, improving both customer satisfaction and margins.

Dynamic Pricing & Promotions

  • Retailers use AI to adjust prices based on demand, competitor pricing, inventory levels, and customer behavior.
  • Amazon is the most visible example, adjusting prices frequently using algorithmic pricing models.

Customer Service & Virtual Assistants

  • Shopify merchants use AI-powered chatbots for order tracking, returns, and product questions.
  • H&M and Sephora deploy conversational AI for styling advice and customer support.

Fraud Detection & Payments

  • AI models detect fraudulent transactions in real time, especially important for eCommerce and buy-now-pay-later (BNPL) models.

Computer Vision in Physical Retail

  • Amazon Go stores use computer vision, sensors, and deep learning to enable cashierless checkout.
  • Zara (Inditex) uses computer vision to analyze in-store traffic patterns and product engagement.

Tools, Technologies, and Forms of AI in Use

Retailers typically rely on a mix of foundational and specialized AI technologies:

  • Machine Learning & Deep Learning
    Used for forecasting, recommendations, pricing, and fraud detection.
  • Natural Language Processing (NLP)
    Powers chatbots, sentiment analysis of reviews, and voice-based shopping.
  • Computer Vision
    Enables cashierless checkout, shelf monitoring, loss prevention, and in-store analytics.
  • Generative AI & Large Language Models (LLMs)
    Used for product description generation, marketing copy, personalized emails, and internal copilots.
  • Retail AI Platforms
    • Salesforce Einstein for personalization and customer insights
    • Adobe Sensei for content, commerce, and marketing optimization
    • Shopify Magic for product descriptions, FAQs, and merchant assistance
    • AWS, Azure, and Google Cloud AI for scalable ML infrastructure

Benefits Retailers Are Realizing

Retailers that have successfully adopted AI report measurable benefits:

  • Higher Conversion Rates through personalization
  • Improved Inventory Turns and reduced waste
  • Lower Customer Service Costs via automation
  • Faster Time to Market for campaigns and promotions
  • Better Customer Loyalty through more relevant, consistent experiences

In many cases, AI directly links customer experience improvements to revenue growth.


Pitfalls and Challenges

Despite widespread adoption, AI in retail is not without risk:

Bias and Fairness Issues

  • Recommendation and pricing algorithms can unintentionally disadvantage certain customer groups or reinforce biased purchasing patterns.

Data Quality and Fragmentation

  • Poor product data, inconsistent customer profiles, or siloed systems limit AI effectiveness.

Over-Automation

  • Some retailers have over-relied on AI-driven customer service, frustrating customers when human support is hard to reach.

Cost vs. ROI Concerns

  • Advanced AI systems (especially computer vision) can be expensive to deploy and maintain, making ROI unclear for smaller retailers.

Failed or Stalled Pilots

  • AI initiatives sometimes fail because they focus on experimentation rather than operational integration.

Where AI Is Headed in Retail and eCommerce

Several trends are shaping the next phase of AI in retail:

  • Hyper-Personalization
    Experiences tailored not just to the customer, but to the moment—context, intent, and channel.
  • Generative AI at Scale
    Automated creation of product content, marketing campaigns, and even storefront layouts.
  • AI-Driven Merchandising
    Algorithms suggesting what products to carry, where to place them, and how to price them.
  • Blended Physical + Digital Intelligence
    More retailers combining in-store computer vision with online behavioral data.
  • AI as a Copilot for Merchants and Marketers
    Helping teams plan assortments, campaigns, and promotions faster and with more confidence.

How Retailers Can Gain an Advantage

To compete effectively in this fast-moving environment, retailers should:

  1. Focus on Data Foundations First
    Clean product data, unified customer profiles, and reliable inventory systems are essential.
  2. Start with Customer-Critical Use Cases
    Personalization, availability, and service quality usually deliver the fastest ROI.
  3. Balance Automation with Human Oversight
    AI should augment merchandisers, marketers, and store associates—not replace them outright.
  4. Invest in Responsible AI Practices
    Transparency, fairness, and explainability build trust with customers and regulators.
  5. Upskill Retail Teams
    Merchants and marketers who understand AI can use it more creatively and effectively.

Final Thoughts

AI is rapidly becoming the invisible engine behind modern retail and eCommerce. The winners won’t necessarily be the companies with the most advanced algorithms—but those that combine strong data foundations, thoughtful AI governance, and a relentless focus on customer experience.

In retail, AI isn’t just about selling more—it’s about selling smarter, at scale.