Tutorials / Prompt Engineering with ChatGPT / Custom instructions and memory

Custom instructions and memory

12 min read text
Course contents (19 lessons)
  1. Understanding the tool
  2. What a language model is, in plain words
  3. How ChatGPT works from a user's point of view
  4. Building a good prompt
  5. The anatomy of a good prompt
  6. Being specific: how to remove guesswork
  7. Showing examples: few-shot prompting
  8. Asking for step-by-step reasoning
  9. Controlling and improving answers
  10. Controlling length, tone and format
  11. Iterating: how to improve an answer with follow-ups
  12. Custom instructions and memory
  13. Working with files and images
  14. ChatGPT for real tasks
  15. Using ChatGPT for writing: emails, reports and rewrites
  16. Using ChatGPT for studying and learning
  17. Using ChatGPT for coding and technical work
  18. Using ChatGPT for data, spreadsheets and business tasks
  19. Prompt templates
  20. A library of reusable prompt templates
  21. Reliable and safe use
  22. Avoiding hallucinations and checking facts
  23. Privacy and safe use
  24. Workflows and final project
  25. Building repeatable workflows and custom assistants
  26. Final project: build your own prompt toolkit

A note before we start

The features in this lesson change often. Names move around, some are only on certain plans, and the settings screens get redesigned. I will describe the ideas in general terms. Look in your own settings for the current version of these features, and treat the exact steps here as a rough guide, not a manual.

The problem they solve

Every new chat starts empty. If you always want the same things, such as short answers, a certain spelling, or a note that you are a beginner, you would have to type them every time. ChatGPT offers settings to avoid that. Broadly they come in two kinds.

  • Custom instructions. Text you write yourself, which is added to your conversations. Typically you describe who you are and how you want answers to look.
  • Memory. Details the system can remember from your chats, such as your preferences or things you told it, and use in later chats. You can usually see, delete or switch off what it remembers.

The difference is control. Custom instructions are exactly what you wrote. Memory is something the system builds as you chat, so it is worth looking at now and then to see what it has kept.

Writing good custom instructions

There are generally two questions to answer: what should it know about you, and how should it respond. Keep both short and concrete.

About me:
I am a self-employed electrician in Lahore. I write quotes and emails
in English but it is my second language. I am not technical with
computers.

How to respond:
- Use plain, short sentences.
- Give the answer first, then the reasoning.
- If a question is unclear, ask one question before answering.
- If you are not sure about something, say so clearly.
- Use metric units and Pakistani rupees unless I say otherwise.

Why this is a good set. It tells the model the language level to aim for, which affects every answer. It sets a habit that avoids waste (answer first). It invites honesty about uncertainty. The units line removes a repeated annoyance. Nothing here is a vague wish like "be helpful and smart", which does nothing.

Instructions for a specific purpose

If you use ChatGPT for one main job, write instructions for it.

About me:
I teach maths to 13 to 15 year olds.

When I ask for a worksheet or an explanation:
- Aim at a student who finds maths hard.
- Use everyday examples (money, sport, cooking).
- Show worked solutions step by step.
- Give 5 practice questions, easy to hard, with an answer key at the end.

This kind of instruction means a request as short as "fractions" can produce a useful lesson sheet. The effect depends on how the product applies these settings, so test it.

Use memory with care

Memory can be handy. You can tell the model things in plain language:

Remember that I prefer British spelling and that my business is called
Noor Electric. Please use these in future replies.

If memory is available, the assistant may store this. You can also ask:

What do you remember about me from our past conversations?
List everything, and tell me how I can delete or turn off any of it.

It is a sensible habit to check this list sometimes. Remembered details can be wrong, outdated, or surprising. You can also usually start a temporary or incognito-style chat that does not use or save memory, if your version has one. Use it for anything you do not want kept around.

What to keep out

  • Passwords, banking details, ID numbers and other secrets. These never belong in any chat.
  • Other people's private information, unless you have good reason and the right to share it.
  • Details you would not want to see on a screen shared at a meeting.
  • Anything that is only true today. An old instruction like "I am writing a thesis on X" will confuse later chats when you have moved on.

Conflicts and overrides

A message in the chat usually wins over a general setting. If your instruction says "short answers" and you ask "write a detailed 800-word report", the specific request should win. If it does not, say so directly: "ignore the short-answers rule for this task". The more specific and the more recent an instruction is, the more weight it usually gets.

Test and prune

Save your instructions, then run three typical questions and read the answers. If the style is wrong, change one line at a time, as in any prompt. Delete lines that do nothing. A list of ten rules is followed less well than a list of five.

The common mistake

Writing a long personal biography. The model needs what changes its answers: your level, your field, your language preference, the format you like. Your life story does not help and may bias answers. The other mistake is forgetting the settings exist. Many people spend months complaining about long answers, and a single line in settings would have fixed it. Also, people forget they gave an instruction, then wonder why the replies sound odd. Check the settings first when behaviour seems strange.

Try it yourself

  1. Open your settings and find the personal-instruction and memory options in your version. Write down what each one is called today.
  2. Write a five-line "how to respond" block for your real use. Test it on three questions.
  3. Ask the assistant what it remembers about you, if memory is on. Delete anything that is wrong or that you would not want stored.
text
About me:
I am a self-employed electrician in Lahore. I write quotes and emails
in English but it is my second language. I am not technical with
computers.

How to respond:
- Use plain, short sentences.
- Give the answer first, then the reasoning.
- If a question is unclear, ask one question before answering.
- If you are not sure about something, say so clearly.
- Use metric units and Pakistani rupees unless I say otherwise.

This course is free to read. Create a free account to enrol, save your progress and pick up where you left off.

Sign up free I already have an account