Using system prompts to shape AI output
Turning AI chats into reusable agents.
System prompts are base instructions to AI that shape how it behaves and what kind of output you get. Used well, they turn AI chats into AI agents that are particularly good at doing specific things.
The most difficult and/or recurring tasks are great candidates for system prompts. Some tasks are more temporary in nature, like working on a specific project. Other tasks are more evergreen, such as generating ideas, reviewing requirements, or creating prototypes.
There’s no single best-practice format for a system prompt, but there are a few elements that tend to be useful to include:
- Role: who the agent is
- Context: information about the situation
- Task: what you want the AI to do
- Format: how you want the output to look
Writing a system prompt can feel daunting, but the good thing is that AI can do most of the work for us.
One method for doing this is to ask AI to create a system prompt based on a chat where you’ve iterated step by step until you reach a desirable output, so you can reproduce a similar result in the future.
For example, let’s say you ask AI to generate ideas for a certain type of project. After the first set of ideas, you give it further instructions to improve the output. Once you’re satisfied, you ask the AI to summarise those instructions into a system prompt you can use in the future to get similar results.
In practice, there are different ways to apply system prompts, but the most basic one is to copy-paste the prompt into new or ongoing chats. I save system prompts in a personal notes system for future reference.
Another option is to add it to the base instructions when creating a Custom GPT in ChatGPT, so it’s used every time that GPT is called.