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
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?
Show answer and explanation
Answer:
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