‹ All AI-103 questions

AI-103 Practice Question 56: Few Shot Prompt Format

Microsoft Azure AI Apps and Agents Developer Associate (AI-103) · Test 6 · question 6 of 10

Implement generative AI and agentic solutionseasy

A team classifies incoming support tickets with a chat model. The system message only says "Classify the ticket into one of: Billing, Technical, Account." Responses are inconsistent, sometimes a single word, sometimes a full sentence, sometimes an unsolicited explanation. The team wants a consistent one-word category in every response, fixed by editing the prompt alone, with no model training involved.

What should they add to the prompt?

Select one answer
Show answer and explanation

Answer:

  • D. A handful of example tickets paired with their correct one-word category, added as example user and assistant turns after the system message

This is few-shot learning: including "one or more examples of the desired behavior of the model, typically by including input and output pairs." With the Chat Completions API, those examples are added "to the messages array in the form of example user and assistant interactions after the initial system message." Microsoft's own comparison shows why this beats instructions alone: given only an instruction (zero-shot), a classification prompt produced a full explanatory sentence, while adding a few labeled examples produced the single expected label: "the examples cleanly show the model how to operate."

- A is wrong because it's still zero-shot, no examples, just more words describing the same instruction. The team is already relying on an instruction, and that's the approach producing inconsistent output. - B is wrong because temperature controls how random token selection is, not the shape of the output. A model can be perfectly deterministic and still choose to answer in a full sentence every time. - C is wrong because fine-tuning requires a labeled dataset and a training run, real options for a recurring drift problem, but not the fastest fix here, and the team wants a prompt-only change.

Reference: Prompt engineering techniques

Practice Test 6 ›

Study guides for AI-103

AI engineer roadmap 2026: skills, certs and the orderAI engineer roadmap for 2026: skills to learn in order, AI engineer vs ML engineer, which certifications fit each stage, and what to skip.
AI-200 exam guide: Azure AI Cloud Developer AssociateAI-200 replaced AZ-204: what the Azure AI Cloud Developer exam tests, how it differs from AI-103, price in USD and INR, format and how to prepare.
How AI Is Changing Software Jobs: Where to PrepareHow AI is changing software jobs: what history shows, the evidence on junior developers, what Klarna learned, new AI roles and five domains to prepare for.
AI-901 exam guide: Azure AI Fundamentals after AI-900AI-901 replaced AI-900: learn what changed, how much Python and Microsoft Foundry you need, exam costs in India, and how to prepare.
Best AI certifications 2026: AWS, Google, Microsoft, ClaudeThe best AI certifications in 2026 from AWS, Google, Microsoft, Claude and Databricks, by level, with price, status and which one to take first.
Microsoft AI certification path 2026: which exam firstMicrosoft AI certification path for 2026 - AI-901, AB-730, AI-103, AI-200, AI-300, AB-100, AI-500 and GH-300 by role, and which exam to take first.
AI-103 Certification Guide: What Changed From AI-102The AI-103 certification replaced AI-102 in 2026. Exam format, cost, the five skill domains, what changed and how to prepare, with free practice questions.
What Is RAG? How Retrieval-Augmented Generation WorksWhat RAG is and how it works: chunking, embeddings, vector search, hybrid search, reranking, GraphRAG and agentic RAG on AWS, Google and Azure.
Prompt engineering vs RAG vs fine-tuningWhen to use prompt engineering, retrieval-augmented generation, fine-tuning or continued pre-training, compared on cost, freshness, hallucination and privacy.