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 Temperature | High Temperature |
|---|---|
| More predictable | More creative |
| More focused | More varied |
| Better for factual tasks | Better 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
