StudyToCert

All certifications / Azure AI Engineer / Lessons

Microsoft Certified: Azure AI Engineer Associate AI-102 · Domain 2: Implement generative AI solutions

Prompt engineering techniques: clear instructions, few-shot examples, output formats and step-by-step reasoning

▶ Watch the overview video

Last reviewed October 6, 2026 · Leer en español

Explain it simpler

Prompt engineering means writing your request to an AI model so clearly that it gives you what you need every time. The model cannot ask follow-up questions, so anything vague in your request turns into random results. Good prompts say who the model is, what to do, what not to do and what to say when it does not know. They clearly separate your instructions from the text you want worked on. They show a few examples of exactly the answer you want. They spell out the format, like a list or a fixed set of labels. For hard problems, they ask the model to think it through step by step. It is like giving a new coworker a job: clear instructions and a sample finished form get far better results than just saying sort these.

At Lakeshore Health, the HR leave-request tool went live on Tuesday, and by Wednesday the payroll analyst Dana has a spreadsheet full of labels nobody agreed on: Vacation, vacation leave, PTO, Holiday, and one that just says sure. The model understands the requests perfectly well; it simply has no idea which words payroll expects. Leadership is already asking whether the team needs to fine-tune a custom model. Before anyone books training compute, Dana's colleague suggests changing nothing but the text sent to the model. Can a better prompt really fix this?

Prompt engineering is the practice of writing inputs that reliably get the output you need. It is the cheapest way to improve a generative AI app, so it always comes before retrieval augmented generation (RAG) or fine-tuning. The reason is simple: the model only knows what is in its training data and in the prompt, and it cannot ask you what you meant. Any ambiguity in the prompt becomes inconsistency in the output. On the AI-102 exam, a scenario that describes inconsistent formats or off-target answers from a capable model usually points to a prompt change first.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 7 more sections, 5 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study Azure AI Engineer for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the Azure AI Engineer study plan