Course menuAI-901

Exams / AI-901 / Prompts and deploying a model in the Foundry portal / Question 2

AI-901 practice question: Prompts and deploying a model in the Foundry portal (2 of 5)

Implement AI solutions by using Microsoft Foundry A free question from our original AI-901 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current Microsoft Learn ·How we write our questions

A garden-supply retailer's chat assistant answers plant-care questions, but its replies vary in tone and length.

The developer wants to show the model two sample exchanges before each real question: a sample customer question followed by an ideal reply in the house style.

Which message role should carry the ideal sample replies?

Choose one answer.

  1. A. The system role, which holds the standing instructions for the whole conversation
  2. B. The user role, which carries the customer's request that the model must answer
  3. C. The assistant role, which holds earlier model replies and few-shot example answers
  4. D. The tool role, which returns results from a function the model called earlier
Show the answer and explanation

Answer: C

  • A. Wrong: The system message sets the assistant's role, rules and tone for every reply. It could describe the house style, but sample replies placed in a conversation are normally written as assistant messages.
  • B. Wrong: User messages hold the requests, so they suit the sample customer questions. Putting the ideal replies in user messages would make them look like more questions rather than examples of answers.
  • C. Right: Correct. Assistant messages represent the model's own replies, so a sample question in a user message followed by an ideal answer in an assistant message forms a few-shot example. The model then copies that tone and length. Learn more: Prompt engineering techniques (opens in a new tab)
  • D. Wrong: Tool messages carry the output of a function or tool call back to the model. They are not used for examples of how the assistant should reply.

Explanation

Few-shot prompting shows the model example exchanges before the real request. The sample questions go in user messages and the ideal replies go in assistant messages, while the system message holds standing instructions. Tool messages return function results and play no part in examples.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Prompts and deploying a model in the Foundry portal? The 5 full-length practice sets have 25 more Prompts and deploying a model in the Foundry portal questions, 225 in all, none of them in the free exam. One payment of $9.99 $6.99, no subscription. Get the practice sets

Every exam starts with free questions. No account needed.