Lesson 30 of 42

The tight system prompt

The 5-part skeleton, scaled up

3 min read

The Bayt Coffee brief lands on Hagar's desk on a Tuesday morning. The owner is a former engineer who started roasting coffee in Zamalek in 2019. He wants a customer-support assistant that handles the dull 80% — order status, shipping questions, basic product info — without sounding like a chatbot from 2014. Hagar has one screen of API access and a deadline.

Module 7 walks the five lessons:

The 5-part system-prompt skeleton

1. Role
2. Capabilities
3. Constraints
4. Format
5. Examples

This is where the 5-slot prompt skeleton from Module 2 graduates from a one-shot trick into a permanent contract. A real production system prompt is just the same five slots, written more carefully, in a fixed order:

#SlotWhat goes here
1RoleWho is the model? One sentence, with the brand.
2CapabilitiesWhat is it allowed to help with? List the in-scope topics.
3ConstraintsThe hard "must" and "must-not" rules. Tone, banned words, refusal scope.
4FormatWhat the output should look like. Length, structure, sign-off.
5ExamplesOne or two worked examples. Optional but powerful.

Each slot is short. None of them is a paragraph. The whole prompt should fit on one screen — under 300 words is a good target, under 400 is the absolute ceiling. System prompts that do not fit in working memory rot.

Why the order matters

Role first because it sets every other slot's context. Capabilities second so the model knows what is on the table before it hears what is off. Constraints third because they are the most likely place a customer will try to push. Format fourth because output shape comes after content rules. Examples last because they show the model the joint shape of all the rules above — they are the ground truth.

You can break this order in personal experiments. Do not break it in a system prompt that ships. The order is what makes the prompt readable when a teammate has to debug it at 2am.

What this module will do

Lessons 2–4 walk through three of the five slots in detail (Role, Constraints, Format + Examples) using the Bayt Coffee assistant as the running example. Lesson 5 puts the whole thing together and shows the live model output you saw briefly in Module 6 — but this time you will know exactly which slot did which job.

Next: writing the Role slot — sharper than "you are a helpful assistant". :::

Quiz

Module 7: The tight system prompt

Take Quiz
Was this lesson helpful?

Sign in to rate

FREE WEEKLY NEWSLETTER

Stay on the Nerd Track

One email per week — courses, deep dives, tools, and AI experiments.

No spam. Unsubscribe anytime.