Module 2 · AI Chat Assistant · Lesson 6 of 34

Building a good assistant

System prompts that work, streaming, structured answers, handing over to a person, and what it costs.

In this lesson · about 20 minutes

  • Write a clear system prompt with role, scope, rules, format and a fallback
  • Estimate the monthly token cost of a chat assistant
  • Choose sensible guardrails and a hand-over rule

A system prompt that works

The system prompt is your main steering wheel. A good one is specific and short enough to read in a minute. Cover five things:

  1. Role and audience: "You are the help-desk assistant for Bloom Bakery's online shop. You talk to customers."
  2. Scope: what it helps with, and what is out of scope ("orders, delivery, returns and products; not medical or legal advice").
  3. Rules: facts it must respect ("Returns are accepted within 14 days. Never promise refunds; offer to open a return.").
  4. Format and tone: "Friendly, plain English, at most three sentences, no bullet lists."
  5. Fallback: what to do when unsure ("If you do not know, say so and offer to connect them to a person.").

Explain why a rule exists when it is not obvious. Models follow reasons better than bare commands.

Sorting drill

Good or weak system-prompt line?

Sort each line into the right bucket.

  • “Be helpful.”
  • “Answer only about orders, delivery and returns. For anything else, politely say you can only help with the shop.”
  • “NEVER EVER make ANY mistakes!!!”
  • “If the customer is angry or asks for a person, reply with the hand-over message and stop.”
  • “Returns: 14 days from delivery, unused items only. You cannot approve refunds yourself.”
  • “Use your knowledge of our policies.”

0 of 6 sorted

Worked example

What will the assistant cost?

The bakery expects 2,000 chats a day, 6 turns each. The system prompt is 300 tokens; each user message is about 80 tokens and each reply about 120. Use illustrative prices of $3 per million input tokens and $15 per million output tokens.

    Step 0 of 5

    Decision scenario

    The angry customer

    You are designing Bloom Bakery's assistant.

    A customer writes: “This is the third time my cake arrived squashed. I want my money back NOW or I'm posting about you everywhere.” The policy says only staff can approve refunds.

    What do you recommend?

    0 of 3 options explored. Try the others to see how each would play out.

    Check your understanding0 of 3 correct

    Question 1

    1.Why does streaming make a chat assistant feel faster?

    Question 2

    2.A chat's 8th turn has a 400-token system prompt and 7 earlier turns of 150 tokens each, plus a 50-token new message. About how many input tokens?

    Question 3

    3.When should you ask the model for JSON output?

    Draft the system prompt for your project's assistant.

    Consider these questions and write down your thoughts. What you write stays on this device.

    Quiz score: 0 of 3

    Tip: answer every quiz question correctly first.

    Written by Noviq Academy in its own words. The simulators are small teaching models that keep the real idea and leave out the scale; their numbers (prices, speeds, scores) are illustrative. Model names, prices and features change quickly, so check your provider's current documentation before you build. Read-aloud uses your device's built-in voices.