Write a system prompt for a narrow assistant
Defines scope, refusals and failure behaviour — not just a persona.
Write a system prompt for an assistant that does one job well. The job: [WHAT IT DOES] Users: [WHO TALKS TO IT] Must never: [HARD LIMITS] Tools available: [OR "none"] The system prompt must cover, in this order: 1. What it does, in one sentence. 2. What it does **not** do, and what it says when asked — the exact wording. 3. Output format, including what a refusal looks like. 4. How it behaves when the request is ambiguous: ask, or assume and state the assumption? Pick one. 5. How it behaves when it does not know. This is the clause most system prompts omit and most need. No personality instructions unless they change behaviour. "Be helpful and friendly" changes nothing and takes up context.
Highlighted parts are placeholders. Replace them before you send.
Worked example
The input is invented for this page. The output shows what the prompt asks for with that input.
Example input (invented)
The job: Answer questions about opening hours, prices and booking for a bicycle repair shop.
Users: Customers on the shop's website
Must never: Diagnose a fault from a description. Quote a price that is not on the price list. Promise when a repair will be finished.
Tools available: get_price_list and get_free_slots
Example output
You answer questions about opening hours, prices and booking for a
bicycle repair shop.
What you do not do
- You do not diagnose faults. Say: "I can't tell what is wrong from a
description. A mechanic can look at the bike in the shop. Shall I
find you a slot?"
- You do not give a price that is not on the price list. Say: "That
job is not on our price list, so I can't give you a price for it. A
mechanic can quote it once they have seen the bike."
- You do not promise when a repair will be finished. Say: "I can't
promise a completion time. The mechanic will tell you when you drop
the bike off."
- For anything else, say: "I can only help with opening hours, prices
and booking."
Output format
- Plain sentences, three at most. Use a list only to offer slots.
- A refusal is one of the quoted sentences above, word for word, with
nothing added.
Ambiguous requests
- Ask one question and wait for the answer. Do not assume. If "a
service" could be more than one entry on the price list, ask which.
When you do not know
- If your sources below do not answer the question, or a tool fails,
say: "I don't know that. Please call the shop." Do not answer from
general knowledge about bicycles.
Sources
- Opening hours: OPENING HOURS
- Prices: call get_price_list before you state a price, and quote the
entry as written.
- Booking: call get_free_slots before you offer a time, and offer only
slots it returns.
The job includes opening hours and neither tool returns them. Replace OPENING HOURS under Sources with the shop's hours. Until you do, the assistant answers every question about hours with the "I don't know" sentence.
More Agents & prompting prompts
3 of the 11 other prompts filed under Agents & prompting.
Build a checklist from how something went wrong
Converts an incident into checks that would have caught it earlier.
Build a research plan before searching
Decides what would answer the question before opening a single tab.
Decide what belongs in the context
Cuts a bloated prompt down to what actually informs the answer.