OpenAI tracker

What should you put in a custom GPT's instructions and knowledge files?

· By Robert Scales · 4 min read

Short answer

Put the behavior in the instructions: the GPT's job, who it serves, the steps it follows, the format of its answers and what it must refuse. Put the reference facts in knowledge files: short, clearly labeled documents it can search, such as tables and house rules, with nothing private, because users can draw out both.

A custom GPT has two places to put what you know, and mixing them up is the most common reason a new GPT behaves oddly. The instructions box is a standing prompt that shapes every reply; developers would call it a system prompt. Knowledge is a set of files you upload, which the GPT searches for relevant passages when a question seems to need them. That search step is called retrieval: the system pulls a few matching pieces of your files into the conversation, rather than reading every file every time.

The practical rule follows from that difference. Anything the GPT must always do belongs in the instructions. Anything it should look up belongs in a file.

Where each thing goes

Put it in the instructionsPut it in a knowledge file
The GPT's job and audienceTables of facts, such as conversions
The steps to follow, in orderYour own recipes, policies or FAQs
The answer formatExamples of good answers, if they are long
What to refuse or avoidGlossaries of terms
When to use which file, by nameNothing secret or personal

The Configure tab in the GPT builder also offers a name, a short description and up to four conversation starters, the clickable example prompts users see first. You can switch on browsing, image making with DALL·E and Code Interpreter, OpenAI's tool for running small programs and doing calculations. Turn on only what the job needs.

A worked example: a recipe-scaling GPT

Imagine a GPT that resizes recipes for a home cook: double a soup, halve a cake, convert cups to grams. Here is an instructions block that would fit in the Configure tab.

Prompt
You help home cooks scale recipes up or down and convert units.

Steps, every time:
1. Ask for the recipe and the number of servings wanted, if either is missing.
2. Work out the scaling factor and say it in one line ("Factor: 1.5").
3. Scale every ingredient. Use the file conversions.csv for cup and spoon
   to gram conversions; if an ingredient is not in it, give the volume
   only and say the weight is not listed.
4. Use Code Interpreter for the arithmetic, then round to amounts a cook
   can measure (no "0.37 eggs": suggest 1 small egg or say to whisk
   and use part).
5. Apply the notes in scaling-notes.md for baking, spices and pan sizes.

Answer format: a two-column table (ingredient, new amount), then at most
three short notes. Never change the method steps except cooking time
and pan size, and flag those as estimates to check while cooking.
If asked about allergies or special diets, say you only scale and
convert, and suggest checking labels and a qualified professional.

And here is a knowledge-file plan to go with it:

  • conversions.csv: one row per ingredient, with columns for ingredient, unit and grams. Plain, labeled tables are easier to search than a scanned page.
  • scaling-notes.md: short rules from your own kitchen experience, for instance how you adjust salt and spices when you double a dish, and a reminder that a different pan size changes baking time.
  • house-recipes.md (optional): a few of your own recipes, each starting with a clear heading, so users can ask for "the lentil soup, for eight."

Two choices in that block do most of the work. Each file is named in the instructions, so the GPT knows when to consult it. And the arithmetic goes to Code Interpreter, which actually computes, instead of asking the language model to multiply in its head.

Practical lessons from the first two weeks

Developer Simon Willison, who has built and published several GPTs, reports a few early pitfalls. The conversational Create tab fills in the same Configure form for you, but it sometimes rewrote his carefully edited instructions without asking. His workaround is to keep the master copy of your instructions in a separate text file and paste it in. He also found the knowledge feature slow and hard to get good results from so far, and notes that OpenAI hasn't said which file formats or splitting methods work best. Keeping files short, plainly formatted and clearly headed is the cautious choice until more is known.

The most important lesson concerns privacy. OpenAI says chats with a GPT are not shared with its builder. The reverse is not true: Willison warns that a persistent user can coax out a GPT's instructions and pieces of its files, and if Code Interpreter is on, can even ask for the files themselves. Treat everything you put in as public.

Try it: Take one prompt you reuse often and split it in two: the rules go in an instructions block, the reference facts go in a short labeled file. Name the file inside the instructions, then compare the answers with and without that line.

How do you test it before sharing?

Write a short test script before you publish, and run it in the preview pane next to the builder. Five to ten test messages are enough to start. For the recipe GPT, include a normal case ("Double this pancake recipe"), a missing detail ("Scale this" with no serving count), an awkward number ("Make 7 servings from a recipe for 4"), an ingredient not in your table, a baking recipe that should trigger the notes, and an off-topic request about allergies. Write down what a good answer looks like for each one before you send it, so you judge the result against your own standard rather than whatever appears.

Then try to break it. Ask it to ignore its instructions, to reveal its files, or to give medical advice. You can't fully stop a determined user from extracting the instructions, but you can check that the GPT stays on task and declines what it should.

Each time you change the instructions, rerun the whole script, because a fix for one case can quietly break another. When every test passes, share it by link with two or three people first and ask them what confused them. Only then consider making it public.

Sources

  1. Introducing GPTs — OpenAI, November 6, 2023
  2. Exploring GPTs: ChatGPT in a trench coat? — Simon Willison's Weblog, November 15, 2023

Get the free Guide to Artificial Intelligence

Sign up for the weekly newsletter and receive the free guide: what changed in AI this week, one lesson, one prompt to try. Unsubscribe in one click.

How we handle your address

Back to top

Display

Your choices are saved in this browser only. No data is sent.

Text size
100%
Colours
Reading
More settings
Accessibility statement