Prompting Fundamentals: System & User Prompts
The quality of AI output depends on the quality of your prompts. Learn how system prompts set the rules and user prompts ask the questions — the foundation of every AI interaction.
What are prompts?
A prompt is your instruction to the AI — it’s how you tell the model what to do.
Think of it like directing a very capable but literal assistant. If you say “Write something about cats,” you’ll get a random essay. If you say “Write a 3-paragraph blog post about why cats make great pets for small apartments, aimed at first-time pet owners, in a friendly tone” — you’ll get exactly what you need.
There are two types: the system prompt (the rules the AI follows) and the user prompt (what you actually ask).
System prompt vs user prompt
| Feature | System Prompt | User Prompt |
|---|---|---|
| Who sets it | The developer/app builder | The end user |
| When it's set | Before any conversation starts | Each time the user sends a message |
| Purpose | Defines the AI's role, rules, tone, and boundaries | Asks a specific question or gives a task |
| Visible to user? | Usually hidden | Always visible |
| Changes during chat? | No — stays constant | Yes — changes with each message |
| Analogy | The employee handbook | The customer's request |
Writing effective system prompts
A system prompt sets the identity, rules, and boundaries for the AI. It’s like an employee handbook that the AI follows for every interaction.
The key components
| Component | Example |
|---|---|
| Role | ”You are a medical information assistant for MediSpark.” |
| Tone | ”Respond in a professional, empathetic tone.” |
| Rules | ”Never provide specific medical diagnoses. Always recommend consulting a doctor.” |
| Format | ”Use bullet points for lists. Keep responses under 200 words.” |
| Knowledge scope | ”Only answer questions about MediSpark’s services and general health topics.” |
| Safety guardrails | ”If asked about medication dosages, respond with: ‘Please consult your healthcare provider.’” |
Example system prompt
MediSpark’s patient FAQ assistant:
You are MediSpark's patient information assistant. Your role is to help patients
with appointment booking, general health information, and clinic services.
Rules:
- Respond in a warm, professional tone
- Never provide specific medical diagnoses or medication advice
- If asked about symptoms, suggest booking a consultation
- Keep responses under 150 words
- If you don't know the answer, say "I'll connect you with our team"
- Always protect patient privacy — never ask for sensitive medical details in chat
Writing effective user prompts
User prompts are the questions and instructions that drive each interaction. Better prompts = better answers.
Prompting techniques
| Technique | What It Is | Example |
|---|---|---|
| Be specific | Tell the AI exactly what you need | ”Summarise this article in 3 bullet points” vs “Summarise this” |
| Provide context | Give background information | ”I’m a beginner. Explain what a virtual machine is in simple terms.” |
| Set format | Tell the AI how to structure the response | ”Create a table comparing Azure VMs vs containers” |
| Give examples (few-shot) | Show the AI what you want | ”Classify this review. Example: ‘Great product!’ → Positive” |
| Chain of thought | Ask the AI to reason step by step | ”Think step by step: what Azure services does MediSpark need?” |
Zero-shot vs few-shot vs chain-of-thought prompting
These are the three main prompting strategies:
Zero-shot: No examples, just the instruction.
“Classify this email as spam or not spam.”
Few-shot: Give 2-3 examples first, then the real task.
“Classify emails: ‘Win a prize!’ → spam. ‘Meeting at 3pm’ → not spam. Now classify: ‘Free gift cards!’”
Chain-of-thought: Ask the AI to reason through steps.
“Think step by step: Is this invoice valid? Check the date, verify the amount, confirm the vendor.”
When to use each:
- Zero-shot: Simple, well-understood tasks
- Few-shot: When the AI needs to understand your specific format or criteria
- Chain-of-thought: Complex reasoning tasks where accuracy matters
Common prompting mistakes
| Mistake | Why It Fails | Better Approach |
|---|---|---|
| Too vague | ”Tell me about AI” → unfocused essay | ”Explain how Azure AI Speech converts audio to text, in 3 sentences” |
| No format guidance | Response is unpredictable length/style | ”Respond in a numbered list with no more than 5 items” |
| No role/context | AI doesn’t know the audience | ”You are explaining this to a non-technical manager” |
| Leading questions | Biases the response | Ask neutral questions, let the AI reason |
🎬 Video walkthrough
🎬 Video coming soon
Prompting Fundamentals — AI-901 Module 12
Prompting Fundamentals — AI-901 Module 12
~14 minFlashcards
Knowledge Check
Priya is building a customer FAQ chatbot for a small business. She wants the AI to always respond politely, never discuss competitor products, and keep answers under 100 words. Where should she configure these rules?
DataFlow Corp wants their AI to classify support tickets into categories. The first attempt with 'Classify this ticket' gave inconsistent results. Which prompting technique would most improve consistency?
Next up: Microsoft Foundry — your AI command center. Deploy a model and interact with it in the portal.