If your current InputNotebook (if any) does not have its cursor in a Text cell then clicking on the "Create Prompt Notebook" button will open a new notebook with a single Prompt Cell.
You can then add content to this Prompt Cell, change its "role" assignment and, if you wish, assign a "name" field.
You may create new Prompt Cells either via the same button, or simply by copying an already existing Prompt Cell and editing it.
As you develop your prompt, you can test it either in a single question ChatGPT session (the "ChatGPT" button at the top of the notebook or the "ChatGPT Single Question from Prompts" button in the Palette) or a ChatGPT conversational session. (the "ChatGPT Conversation" button at the top of the notebook or the "ChatGPT Conversation with Prompts" button in the Palette).
Starting with a Prompt Notebook from a Text Cell
If your current InputNotebook has its cursor in a Text cell (or a TextCell's cell bracket selected) then clicking on the "Create Prompt Notebook" button will open a new notebook with multiple Prompt Cells. You should make sure that the TextCell contains only non-formatted text.
The number of Prompt Cells will be the same as the number of sentences in the TextCell, and each Prompt Cell will have its "contents" InputField filled in with the corresponding sentence. The Prompt Cell will be in the same order as the sentences in the TextCell.
As an example consider the following TextCell:
You are a helpful assistant. When you answer a question you will always respond in the form of a Haiku. All sentences in that Haiku will be in UpperCase. Each Haiku will be written in a positive tone.
If you select that cell, and then click on the Create Prompt Notebook button in the palette, the following Prompt Notebook will be created:
The first Prompt Cell really should have the system role. Changing that then looks like this (the different choices for roles are colored with a different background to distinguish them at a glance):
If we then open up a ChatGPT session from this notebook and ask a question we can see if this prompt set works as intended. It works!
Interestingly, this worked as intended in gpt-4, but in gpt-3.5-turbo it failed to put the Haiku in all upper case text. One could then modify the prompts in the Prompt Notebook—by changing the text in the prompt cells, or adding or deleting Prompt Cells, and so on—to see if you can engineer a prompt that also causes gpt-3.5-turbo to work in the desired way.
Creating a Prompt Notebook from a Conversation
An alternative approach to creating a Prompt Notebook comes at it from the opposite direction.
We first start by opening up a new conversational ChatGPT user interface by clicking on the "ChatGPT Conversation with Prompts"" button in the palette without selecting a TextCell in a notebook. The user interface then opens without any prompts pre-set:
You can now start a conversation where the sequence of questions are those that you might want to turn into a Prompt Notebook. Here is an example:
In the final question we tried an example. Now, if you click on the "Prompt Notebook From History" button a Prompt Notebook will be generated:
Of course you probably will want to delete the final Prompt Cell.
Now if you click on either the "ChatGPT Single Question from Prompts" button or the "ChatGPT Conversation with Prompts" button from the palette, when the Prompt Notebook is selected, the user interface will reappear with the prompt set as its default:
Working with a Saved Prompt Notebook
You can save a Prompt Notebook just as you can any other notebook. When you open that Prompt Notebook you can use it in any of the workflows that we describe here.
You can copy Prompt Cells between Prompt Notebooks.
Processing a Set of Prompt Notebooks
If you have a set of Prompt Notebooks you can retrieve a list of prompts from them for future use. (For example as a set of menu choices in a user interface.)
As an example of this, say you have a set of Prompt Notebooks in a directory called pomptNBFolder.
This folder has two Prompt Notebooks called For Children.nb and For French Scientists.nb.
Then we can "bulk process" the notebooks like this, for example: