Bitzu

AI-901 ยท Generative AI apps in Foundry

System, user and assistant messages

The roles of system, user and assistant messages; writing clear instructions, context, format and examples; few-shot prompting; and grounding with supplied data.

Key points

  • The system message sets standing behavior (persona, rules, output format).
  • User messages carry the request.
  • Assistant messages are earlier model replies, used as conversation history or as examples.
  • Good prompts state the task clearly, add context or source data (grounding), specify the format, and may include a few examples (few-shot).

Practice questions

Single choice

Which message role is the best place for standing rules such as "always answer in two sentences"?

  1. System
  2. User
  3. Assistant
  4. Tool
Show answer

Answer: A. System

Standing behavior belongs in the system message. User messages are per-request, and assistant messages are model output.

Select all that apply

Which techniques help ground answers in your own data?

  1. Include the relevant document excerpt in the prompt
  2. Instruct the model to answer only from the supplied text
  3. Increase the temperature
  4. Tell the model to say it does not know when the text lacks the answer
  5. Increase max tokens
Show answer

Answer: A. Include the relevant document excerpt in the prompt, B. Instruct the model to answer only from the supplied text, D. Tell the model to say it does not know when the text lacks the answer

Supplying the source text and telling the model to rely only on it (and admit gaps) grounds the answer. A higher temperature and a bigger token limit do not add facts.

True or false

True or false: Few-shot prompting retrains the model's weights with your examples.

Show answer

Answer: False

False. Examples in the prompt guide the response for that request only; the model weights stay unchanged.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More AI-901 topics in this module