Tag: Microsoft Foundry

Create a lightweight chat client application by using the Foundry SDK (AI-901 Exam Prep)

This post is a part of the AI-901: Microsoft Azure AI Fundamentals Exam Prep Hub. 
This topic falls under these sections:
Implement AI solutions by using Microsoft Foundry (55–60%)
--> Implement generative AI apps and agents by using Foundry
--> Create a lightweight chat client application by using the Foundry SDK


Note that there are 10 practice questions (with answers and explanations) for each section to help you solidify your knowledge of the material. Also, there are 2 practice tests with 60 questions each available on the hub below the exam topics section.

Modern generative AI applications often include chat-based interfaces that allow users to interact naturally with AI models. Microsoft Azure AI Foundry provides SDKs (Software Development Kits) that developers can use to build lightweight chat applications that connect to deployed AI models.

For the AI-901 certification exam, candidates should understand the basic concepts behind creating chat client applications using the Foundry SDK and how these applications interact with deployed generative AI models.

This topic falls under the “Implement generative AI apps and agents by using Foundry” section of the AI-901 exam objectives.


What Is a Chat Client Application?

A chat client application is a software application that allows users to communicate with an AI model using conversational prompts and responses.

Users type messages, and the AI model generates replies.


Common Chat Application Examples

Examples include:

  • AI assistants
  • Customer support bots
  • Internal company copilots
  • Study assistants
  • Virtual agents
  • Help desk chatbots

What Is an SDK?

SDK stands for Software Development Kit.

An SDK provides tools and libraries that help developers build applications more easily.

SDKs typically include:

  • APIs
  • Authentication tools
  • Code libraries
  • Documentation
  • Example code

What Is the Foundry SDK?

The Foundry SDK allows developers to connect applications to deployed AI models within Azure AI Foundry.

Developers can use SDKs to:

  • Send prompts
  • Receive AI-generated responses
  • Manage conversations
  • Configure requests
  • Handle authentication

Why Use an SDK?

Using an SDK simplifies development.

Without an SDK, developers would need to manually handle:

  • Network requests
  • Authentication
  • Error handling
  • API formatting

SDKs abstract much of this complexity.


Lightweight Chat Applications

A lightweight chat client is a simple application focused on core chat functionality.

It usually includes:

  • User input field
  • Conversation display
  • AI response generation
  • Basic session management

Basic Chat Workflow

A typical AI chat application workflow includes:

  1. User enters a prompt
  2. Application sends request to deployed model
  3. AI model processes prompt
  4. Model generates response
  5. Application displays response

Connecting to a Deployed Model

Chat applications connect to deployed AI models using:

  • API endpoints
  • Authentication credentials
  • SDK libraries

The deployed model processes incoming prompts.


Authentication

Applications typically authenticate using:

  • API keys
  • Azure credentials
  • Managed identities

Authentication ensures only authorized users and applications can access AI services.


Example Chat Interaction

User

“Explain machine learning in simple terms.”

AI Model

“Machine learning is a type of AI where computers learn patterns from data instead of being explicitly programmed.”


Conversation History

Many chat applications maintain conversation history.

This allows the AI model to remember context during the session.


Example of Context Retention

User

“Who founded Microsoft?”

AI

“Microsoft was founded by Bill Gates and Paul Allen.”

User

“When was it founded?”

Because conversation history is maintained, the AI understands the second question refers to Microsoft.


System Prompts in Chat Applications

Chat applications often include system prompts that guide model behavior.


Example System Prompt

“You are a helpful technical tutor. Explain topics clearly for beginners.”

This influences:

  • Tone
  • Style
  • Behavior
  • Safety

User Prompts

User prompts represent the questions or requests entered during the conversation.


Example User Prompt

“Explain neural networks.”


Model Responses

The deployed AI model generates responses based on:

  • System prompt
  • User prompt
  • Conversation history
  • Model parameters

Model Parameters

Chat applications may configure parameters such as:

  • Temperature
  • Maximum tokens
  • Top-p sampling

Temperature

Temperature controls response creativity.

Low TemperatureHigh Temperature
More focusedMore creative
More predictableMore varied

Maximum Tokens

Maximum tokens limit response length.

Smaller values create shorter responses.


Streaming Responses

Some chat applications support streaming responses.

Streaming displays generated text gradually as the model produces it.

This improves user experience by reducing perceived waiting time.


Error Handling

Applications should handle errors gracefully.

Common issues include:

  • Network failures
  • Invalid credentials
  • Rate limits
  • Timeout errors

Rate Limits

AI services may limit request frequency.

Applications should be designed to handle:

  • Request throttling
  • Retry logic
  • Usage quotas

Responsible AI Considerations

Chat applications should follow Responsible AI principles.

Important considerations include:

  • Content filtering
  • Privacy
  • Safety
  • Bias reduction
  • Transparency

Content Filtering

Content filters help reduce:

  • Harmful responses
  • Offensive content
  • Unsafe outputs

Privacy and Security

Applications should protect:

  • User conversations
  • Authentication credentials
  • Sensitive information

Logging and Monitoring

Organizations may monitor chat applications for:

  • Performance
  • Usage
  • Errors
  • Safety concerns

Azure AI Foundry

Azure AI Foundry provides tools for deploying models and managing generative AI applications.

Developers can:

  • Deploy models
  • Test prompts
  • Monitor applications
  • Manage AI resources

Azure OpenAI Service

Azure OpenAI Service provides access to generative AI models used in chat applications.


High-Level SDK Workflow

A simplified workflow for a lightweight chat application typically includes:

  1. Install SDK
  2. Configure credentials
  3. Connect to deployed model
  4. Send prompts
  5. Receive responses
  6. Display conversation

Example High-Level Pseudocode

connect_to_model()
while True:
user_prompt = get_user_input()
response = send_prompt(user_prompt)
display_response(response)

For AI-901, understanding the overall workflow is more important than memorizing syntax.


Common Real-World Scenarios


Scenario 1: Customer Support Chatbot

Goal

Answer customer questions automatically.

Features

  • Conversational interface
  • Context retention
  • Safe responses

Scenario 2: Internal Knowledge Assistant

Goal

Help employees search company information.

Features

  • Question answering
  • Document summarization
  • Secure access

Scenario 3: Educational Tutor

Goal

Provide interactive learning assistance.

Features

  • Step-by-step explanations
  • Conversational learning
  • Prompt customization

Advantages of Chat-Based AI Applications

Benefits include:

  • Natural user interaction
  • Faster information access
  • Automation of repetitive tasks
  • Improved customer experience
  • Scalability

Challenges and Limitations

Organizations should consider:

  • Hallucinations
  • Incorrect responses
  • Cost management
  • Privacy concerns
  • Latency
  • Prompt injection risks

Hallucinations

Generative AI models may occasionally generate incorrect or fabricated information.

These incorrect outputs are called hallucinations.

Applications should not assume all AI-generated responses are accurate.


Prompt Injection Risks

Malicious users may attempt to manipulate prompts to bypass safety controls.

Applications should implement safeguards against unsafe behavior.


Important AI-901 Exam Tips

For the exam, remember these key points:

  • SDKs simplify application development.
  • Chat clients communicate with deployed AI model endpoints.
  • System prompts define AI behavior.
  • User prompts represent user requests.
  • Conversation history helps maintain context.
  • Temperature controls response randomness.
  • Maximum tokens limit response length.
  • Streaming responses improve user experience.
  • Responsible AI principles apply to chat applications.
  • Authentication secures access to AI services.

Quick Knowledge Check

Question 1

What is the purpose of an SDK?

Answer

To simplify application development using tools and libraries.


Question 2

Why is conversation history important in chat applications?

Answer

It helps maintain context across multiple user interactions.


Question 3

What does temperature control in a generative AI model?

Answer

The creativity and randomness of responses.


Question 4

Why are content filters important?

Answer

They help reduce harmful or unsafe AI-generated outputs.


Practice Exam Questions

Question 1

What is the PRIMARY purpose of a chat client application in generative AI?

A. To physically store servers
B. To allow users to interact conversationally with an AI model
C. To compress database files
D. To manage network hardware


Correct Answer

B. To allow users to interact conversationally with an AI model


Explanation

A chat client application enables users to send prompts and receive AI-generated conversational responses.


Why the Other Answers Are Incorrect

A. To physically store servers

Chat clients are software applications, not physical infrastructure.

C. To compress database files

This is unrelated to chat applications.

D. To manage network hardware

This is unrelated to generative AI chat systems.


Question 2

What does SDK stand for?

A. Secure Data Kernel
B. Software Development Kit
C. System Deployment Key
D. Structured Data Kit


Correct Answer

B. Software Development Kit


Explanation

An SDK provides tools, libraries, and documentation that help developers build applications more efficiently.


Why the Other Answers Are Incorrect

A. Secure Data Kernel

This is not the correct definition.

C. System Deployment Key

This is incorrect terminology.

D. Structured Data Kit

This is not the meaning of SDK.


Question 3

Why do developers commonly use SDKs when building AI applications?

A. SDKs eliminate the need for internet access
B. SDKs simplify communication with AI services and APIs
C. SDKs permanently store all prompts automatically
D. SDKs replace AI models entirely


Correct Answer

B. SDKs simplify communication with AI services and APIs


Explanation

SDKs help developers handle authentication, requests, responses, and integration more easily.


Why the Other Answers Are Incorrect

A. SDKs eliminate the need for internet access

Cloud AI services still require connectivity.

C. SDKs permanently store all prompts automatically

SDKs do not inherently provide permanent storage.

D. SDKs replace AI models entirely

SDKs connect applications to models; they do not replace them.


Question 4

What allows a chat application to remember previous user interactions during a conversation?

A. OCR
B. Conversation history
C. Image classification
D. Regression analysis


Correct Answer

B. Conversation history


Explanation

Conversation history preserves context so the AI can respond appropriately across multiple prompts.


Why the Other Answers Are Incorrect

A. OCR

OCR extracts text from images.

C. Image classification

This categorizes images.

D. Regression analysis

Regression predicts numeric values.


Question 5

Which prompt type defines the AI assistant’s behavior and communication style?

A. User prompt
B. System prompt
C. SQL prompt
D. OCR prompt


Correct Answer

B. System prompt


Explanation

System prompts establish behavior rules, tone, style, and safety guidelines.


Why the Other Answers Are Incorrect

A. User prompt

User prompts contain requests or questions.

C. SQL prompt

SQL is related to databases.

D. OCR prompt

OCR is unrelated to conversational behavior.


Question 6

What is the PRIMARY purpose of authentication in a chat client application?

A. To improve image resolution
B. To ensure only authorized users or applications access AI services
C. To increase response creativity
D. To summarize conversations


Correct Answer

B. To ensure only authorized users or applications access AI services


Explanation

Authentication protects AI resources and controls access to deployed services.


Why the Other Answers Are Incorrect

A. To improve image resolution

Authentication does not affect graphics.

C. To increase response creativity

Temperature settings influence creativity.

D. To summarize conversations

Authentication does not summarize data.


Question 7

Which configuration parameter controls how creative or random a generative AI response will be?

A. Temperature
B. OCR threshold
C. Frame rate
D. Compression ratio


Correct Answer

A. Temperature


Explanation

Temperature controls response randomness and creativity.


Why the Other Answers Are Incorrect

B. OCR threshold

This relates to text extraction.

C. Frame rate

This relates to video processing.

D. Compression ratio

This relates to file compression.


Question 8

What is the benefit of streaming AI responses in a chat application?

A. It improves monitor resolution
B. It allows responses to appear gradually as they are generated
C. It permanently stores all conversations
D. It disables content filtering


Correct Answer

B. It allows responses to appear gradually as they are generated


Explanation

Streaming improves user experience by showing generated text incrementally instead of waiting for the entire response.


Why the Other Answers Are Incorrect

A. It improves monitor resolution

Streaming does not affect displays.

C. It permanently stores all conversations

Streaming does not automatically store data.

D. It disables content filtering

Streaming does not remove safety controls.


Question 9

Which Responsible AI feature helps reduce harmful or offensive AI-generated responses?

A. Content filtering
B. Data compression
C. Video rendering
D. File indexing


Correct Answer

A. Content filtering


Explanation

Content filters help prevent unsafe or inappropriate AI outputs.


Why the Other Answers Are Incorrect

B. Data compression

Compression reduces file size.

C. Video rendering

Rendering creates visual output.

D. File indexing

Indexing organizes data for search.


Question 10

What are hallucinations in generative AI systems?

A. Hardware overheating events
B. Incorrect or fabricated AI-generated information
C. Authentication failures
D. Video processing delays


Correct Answer

B. Incorrect or fabricated AI-generated information


Explanation

Hallucinations occur when AI models generate inaccurate or invented information.


Why the Other Answers Are Incorrect

A. Hardware overheating events

This is unrelated to AI hallucinations.

C. Authentication failures

This is a security issue.

D. Video processing delays

This relates to media performance, not AI accuracy.


Final Thoughts

Creating lightweight chat applications with the Foundry SDK is an important concept for the AI-901 certification exam. Microsoft expects candidates to understand the basic architecture and workflow of AI-powered chat applications, including prompts, endpoints, authentication, conversation management, and Responsible AI considerations.

Azure AI Foundry and Azure OpenAI Service provide powerful tools that allow developers to build conversational AI experiences quickly and efficiently.


Go to the AI-901 Exam Prep Hub main page

Create effective system and user prompts for Generative AI models (AI-901 Exam Prep)

This post is a part of the AI-901: Microsoft Azure AI Fundamentals Exam Prep Hub. 
This topic falls under these sections:
Implement AI solutions by using Microsoft Foundry (55–60%)
--> Implement generative AI apps and agents by using Foundry
--> Create effective system and user prompts for Generative AI models


Note that there are 10 practice questions (with answers and explanations) for each section to help you solidify your knowledge of the material. Also, there are 2 practice tests with 60 questions each available on the hub below the exam topics section.

Prompting is one of the most important skills when working with generative AI systems. Microsoft expects AI-901 candidates to understand how to create effective prompts that guide generative AI models toward useful, accurate, and safe outputs.

This topic focuses on how system prompts and user prompts influence the behavior of generative AI models and how prompt engineering techniques improve AI-generated responses.

This topic falls under the “Implement generative AI apps and agents by using Foundry” section of the AI-901 exam objectives.


What Is a Prompt?

A prompt is an instruction or input provided to a generative AI model.

Prompts guide the model’s response and influence:

  • Content
  • Tone
  • Format
  • Style
  • Accuracy
  • Level of detail

The quality of the prompt strongly affects the quality of the output.


What Is Prompt Engineering?

Prompt engineering is the process of designing and refining prompts to improve AI-generated responses.

Effective prompt engineering helps:

  • Produce more accurate answers
  • Reduce ambiguity
  • Improve consistency
  • Control response format
  • Reduce hallucinations
  • Improve safety and Responsible AI behavior

Types of Prompts

For the AI-901 exam, two important prompt types are:

  • System prompts
  • User prompts

What Is a System Prompt?

A system prompt provides high-level instructions that define how the AI model should behave.

System prompts often control:

  • Personality
  • Tone
  • Rules
  • Safety boundaries
  • Formatting requirements
  • Behavior expectations

The system prompt typically has higher priority than user prompts.


Example of a System Prompt

“You are a professional technical support assistant. Provide concise and accurate troubleshooting guidance. Do not provide harmful or unsafe instructions.”

This system prompt defines:

  • The assistant’s role
  • Communication style
  • Safety expectations

What Is a User Prompt?

A user prompt is the direct request or question submitted by the user.

User prompts specify the task the model should perform.


Example of a User Prompt

“How do I reset my router?”

The AI model combines:

  • System instructions
  • User request
  • Context information

to generate a response.


Relationship Between System and User Prompts

System prompts establish behavior rules, while user prompts define the immediate task.


Example

System Prompt

“You are a helpful travel assistant. Always provide answers in bullet points.”

User Prompt

“Suggest three family-friendly attractions in Orlando.”

The model responds according to both prompts.


Characteristics of Effective Prompts

Good prompts are usually:

  • Clear
  • Specific
  • Contextual
  • Structured
  • Goal-oriented

Clear Prompts

Clear prompts reduce confusion and ambiguity.


Weak Prompt

“Tell me about databases.”


Better Prompt

“Explain the differences between relational and non-relational databases for beginners.”

The second prompt provides:

  • Specific topic
  • Audience
  • Scope

Specific Prompts

Specific prompts improve response accuracy.


Weak Prompt

“Write a report.”


Better Prompt

“Write a 300-word summary of cloud computing benefits for small businesses.”

Specific prompts define:

  • Length
  • Topic
  • Audience

Providing Context

Context helps the model generate more relevant answers.


Example

“I am studying for the AI-901 exam. Explain OCR in simple terms with one real-world example.”

The additional context improves response quality.


Requesting Output Format

Prompts can specify desired formatting.


Example

“Provide the answer as a table.”

or

“Summarize the information in bullet points.”


Role Prompting

Role prompting assigns the AI a specific role or perspective.


Example

“Act as a cybersecurity consultant.”

or

“You are an experienced data analyst.”

Role prompting helps guide tone and expertise.


Step-by-Step Prompting

Prompts can request step-by-step explanations.


Example

“Explain how machine learning works step-by-step for beginners.”

This improves clarity and educational usefulness.


Few-Shot Prompting

Few-shot prompting provides examples within the prompt.

This helps the model understand expected patterns.


Example

Positive review → Positive sentiment
Negative review → Negative sentiment
“The service was excellent.” →

The model learns the desired output structure.


Zero-Shot Prompting

Zero-shot prompting asks the model to perform a task without examples.


Example

“Classify this review as positive or negative.”


Chain-of-Thought Prompting

Chain-of-thought prompting encourages step-by-step reasoning.


Example

“Explain your reasoning step-by-step before providing the final answer.”

This can improve reasoning accuracy for complex tasks.


Prompting for Summarization

Generative AI models can summarize content using prompts.


Example

“Summarize this article in three bullet points.”


Prompting for Content Generation

Prompts can generate new content such as:

  • Emails
  • Reports
  • Stories
  • Marketing copy
  • Code

Example

“Write a professional email requesting a project update.”


Prompting for Transformation Tasks

AI models can transform content into different formats.


Examples

  • Translate text
  • Rewrite text
  • Simplify technical content
  • Convert paragraphs into tables

Example

“Rewrite this paragraph for a non-technical audience.”


Prompting for Code Generation

Generative AI can assist with programming tasks.


Example

“Write a Python function that calculates sales tax.”


Prompting for Data Extraction

Prompts can request structured data extraction.


Example

“Extract all dates and company names from this document.”


Prompt Injection Risks

Prompt injection occurs when users attempt to override system instructions.


Example

A malicious user prompt may attempt to bypass safety rules.

Organizations should implement safeguards against unsafe prompting behavior.


Responsible AI Considerations

Effective prompting should follow Responsible AI principles.

Important considerations include:

  • Safety
  • Fairness
  • Privacy
  • Transparency
  • Content moderation
  • Harm prevention

Hallucinations

Generative AI models can sometimes produce incorrect or fabricated information.

These errors are called hallucinations.

Good prompting can reduce hallucinations but may not eliminate them completely.


Example of a Hallucination

An AI model inventing a fake citation or incorrect fact.


Techniques to Reduce Hallucinations

Helpful strategies include:

  • Providing clear context
  • Using specific instructions
  • Asking for sources
  • Limiting scope
  • Using grounded data

Temperature and Creativity

Some generative AI systems allow configuration settings such as temperature.

Temperature affects randomness and creativity.

Low TemperatureHigh Temperature
More predictableMore creative
More focusedMore varied
Better for factual tasksBetter for brainstorming

Azure AI Foundry

Azure AI Foundry helps developers build, test, and manage generative AI applications and agents.

Developers can:

  • Experiment with prompts
  • Evaluate AI responses
  • Configure AI models
  • Implement safety controls

Azure OpenAI Service

Azure OpenAI Service provides access to powerful generative AI models that support prompt-based interactions.


Real-World Prompting Scenarios


Scenario 1: Customer Support Assistant

System Prompt

“You are a professional support assistant. Be polite and concise.”

User Prompt

“How do I reset my password?”


Scenario 2: Study Assistant

System Prompt

“Explain technical topics for beginners.”

User Prompt

“Explain neural networks in simple terms.”


Scenario 3: Marketing Content Generator

System Prompt

“Generate professional marketing copy.”

User Prompt

“Create a product description for a smartwatch.”


Best Practices for Effective Prompting

  • Be specific
  • Provide context
  • Define output format
  • Use examples when helpful
  • Keep instructions clear
  • Test and refine prompts
  • Avoid ambiguity
  • Include Responsible AI safeguards

Common Prompting Mistakes

Common mistakes include:

  • Vague instructions
  • Missing context
  • Conflicting requirements
  • Overly broad requests
  • Unclear formatting expectations

Important AI-901 Exam Tips

For the exam, remember these key points:

  • System prompts define AI behavior and rules.
  • User prompts specify the task to perform.
  • Effective prompts are clear and specific.
  • Prompt engineering improves AI outputs.
  • Few-shot prompting includes examples.
  • Zero-shot prompting provides no examples.
  • Chain-of-thought prompting encourages reasoning.
  • Hallucinations are incorrect AI-generated outputs.
  • Temperature settings affect creativity and randomness.
  • Responsible AI principles apply to prompting.

Quick Knowledge Check

Question 1

What is the difference between a system prompt and a user prompt?

Answer

A system prompt defines AI behavior and rules, while a user prompt requests a specific task.


Question 2

What is prompt engineering?

Answer

The process of designing prompts to improve AI-generated responses.


Question 3

What is few-shot prompting?

Answer

Providing examples within prompts to guide the model.


Question 4

What are hallucinations in generative AI?

Answer

Incorrect or fabricated AI-generated information.


Practice Exam Questions

Question 1

What is the PRIMARY purpose of a system prompt in a generative AI application?

A. To store images generated by the model
B. To define the AI model’s behavior, rules, and tone
C. To increase internet speed
D. To encrypt database records


Correct Answer

B. To define the AI model’s behavior, rules, and tone


Explanation

System prompts provide high-level instructions that guide how the AI assistant behaves and responds.


Why the Other Answers Are Incorrect

A. To store images generated by the model

System prompts do not store data.

C. To increase internet speed

This is unrelated to AI prompting.

D. To encrypt database records

Encryption is unrelated to prompting.


Question 2

Which statement BEST describes a user prompt?

A. A hidden configuration file for servers
B. A direct instruction or request submitted by the user
C. A database backup mechanism
D. A type of neural network architecture


Correct Answer

B. A direct instruction or request submitted by the user


Explanation

User prompts contain the specific task or question the user wants the AI model to perform.


Why the Other Answers Are Incorrect

A. A hidden configuration file for servers

This is unrelated to generative AI prompting.

C. A database backup mechanism

This is unrelated to prompting.

D. A type of neural network architecture

Prompts are instructions, not architectures.


Question 3

Which prompt is MOST effective?

A. “Tell me stuff.”
B. “Write something about technology.”
C. “Explain cloud computing for beginners in 5 bullet points.”
D. “Do work.”


Correct Answer

C. “Explain cloud computing for beginners in 5 bullet points.”


Explanation

Effective prompts are clear, specific, and include formatting or audience requirements.


Why the Other Answers Are Incorrect

A. “Tell me stuff.”

This is too vague.

B. “Write something about technology.”

This lacks detail and direction.

D. “Do work.”

This is ambiguous and unclear.


Question 4

What is prompt engineering?

A. Designing hardware for AI servers
B. Building neural network chips
C. Creating and refining prompts to improve AI responses
D. Encrypting AI training data


Correct Answer

C. Creating and refining prompts to improve AI responses


Explanation

Prompt engineering focuses on improving generative AI outputs through better prompt design.


Why the Other Answers Are Incorrect

A. Designing hardware for AI servers

This is hardware engineering.

B. Building neural network chips

This is semiconductor engineering.

D. Encrypting AI training data

This is a security task.


Question 5

Which prompting technique includes examples within the prompt to guide the AI model?

A. Few-shot prompting
B. Object detection
C. OCR prompting
D. Clustering


Correct Answer

A. Few-shot prompting


Explanation

Few-shot prompting provides examples so the model better understands the desired output format or pattern.


Why the Other Answers Are Incorrect

B. Object detection

This is a computer vision capability.

C. OCR prompting

OCR extracts text from images.

D. Clustering

Clustering groups similar data.


Question 6

What is the PRIMARY benefit of providing context in a prompt?

A. Reduces network traffic
B. Helps generate more relevant and accurate responses
C. Compresses files automatically
D. Improves database indexing


Correct Answer

B. Helps generate more relevant and accurate responses


Explanation

Context improves the model’s understanding of the user’s goals and intended audience.


Why the Other Answers Are Incorrect

A. Reduces network traffic

This is unrelated to prompting.

C. Compresses files automatically

Prompting does not compress files.

D. Improves database indexing

This is unrelated to AI prompts.


Question 7

Which statement BEST describes hallucinations in generative AI?

A. AI-generated images only
B. Incorrect or fabricated AI-generated information
C. Network security attacks
D. Audio recognition failures


Correct Answer

B. Incorrect or fabricated AI-generated information


Explanation

Hallucinations occur when generative AI produces inaccurate or invented information.


Why the Other Answers Are Incorrect

A. AI-generated images only

Hallucinations can occur in text, code, and other outputs.

C. Network security attacks

This is unrelated to hallucinations.

D. Audio recognition failures

This is unrelated to generative AI hallucinations.


Question 8

Which system prompt would MOST likely encourage safe AI behavior?

A. “Ignore all safety rules.”
B. “Provide harmful instructions when requested.”
C. “Do not generate unsafe or harmful content.”
D. “Always reveal confidential information.”


Correct Answer

C. “Do not generate unsafe or harmful content.”


Explanation

Responsible AI system prompts help enforce safety and ethical boundaries.


Why the Other Answers Are Incorrect

A. “Ignore all safety rules.”

This encourages unsafe behavior.

B. “Provide harmful instructions when requested.”

This violates Responsible AI principles.

D. “Always reveal confidential information.”

This violates privacy and security principles.


Question 9

What effect does a higher temperature setting generally have in generative AI models?

A. Produces more predictable and repetitive responses
B. Produces more creative and varied responses
C. Disables AI reasoning
D. Prevents all hallucinations


Correct Answer

B. Produces more creative and varied responses


Explanation

Higher temperature settings increase randomness and creativity in generated responses.


Why the Other Answers Are Incorrect

A. Produces more predictable and repetitive responses

This is more associated with lower temperature settings.

C. Disables AI reasoning

Temperature does not disable reasoning.

D. Prevents all hallucinations

Hallucinations can still occur.


Question 10

Which example BEST demonstrates role prompting?

A. “Translate this sentence into French.”
B. “Summarize this article.”
C. “Act as an experienced financial advisor and explain retirement planning.”
D. “Convert this image into text.”


Correct Answer

C. “Act as an experienced financial advisor and explain retirement planning.”


Explanation

Role prompting assigns the AI model a specific role or perspective to guide its responses.


Why the Other Answers Are Incorrect

A. “Translate this sentence into French.”

This is a translation request.

B. “Summarize this article.”

This is a summarization request.

D. “Convert this image into text.”

This is an OCR-related task.


Final Thoughts

Prompt engineering is a foundational skill for working with generative AI systems and an important topic for the AI-901 certification exam. Microsoft expects candidates to understand how system prompts and user prompts influence model behavior and how effective prompts improve the quality, reliability, and safety of AI-generated responses.

These concepts are essential when building generative AI applications and agents using Azure AI Foundry and Azure OpenAI Service.


Go to the AI-901 Exam Prep Hub main page