NowComment
2-Pane Combined
Comments:
Full Summaries Sorted

Prompt Engineering - OpenAI

Author: OpenAI

Prompt Engineering - Openai API - Platform.Openai.Com, platform.openai.com/docs/guides/prompt-engineering/prompt-engineering. Accessed 27 Dec. 2023.

13 changes, most recent about 1 year ago

Show Changes

0 General Document comments
0 Sentence and Paragraph comments
0 Image and Video comments


This guide shares strategies and tactics for getting better results from large language models (sometimes referred to as GPT models) like GPT-4. The methods described here can sometimes be deployed in combination for greater effect. We encourage experimentation to find the methods that work best for you.

New Thinking Partner Conversation New Conversation
Paragraph 1 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 1, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 1, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 1, Sentence 3 0
No sentence-level conversations. Start one.

Some of the examples demonstrated here currently work only with our most capable model, gpt-4. In general, if you find that a model fails at a task and a more capable model is available, it’s often worth trying again with the more capable model.

New Thinking Partner Conversation New Conversation
Paragraph 2 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 11:51AM) : On NowComment We are currently using gpt-4-1106-preview (December 2023)
New Thinking Partner Conversation New Conversation
Paragraph 2, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 2, Sentence 2 0
No sentence-level conversations. Start one.

You can also explore example prompts which showcase what our models are capable of:

New Thinking Partner Conversation New Conversation
Paragraph 3 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 3, Sentence 1 0
No sentence-level conversations. Start one.
4
Paragraph 4 changes

Prompt examples

New Thinking Partner Conversation New Conversation
Paragraph 4 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 4, Sentence 1 0
No sentence-level conversations. Start one.

Explore prompt examples to learn what GPT models can do

New Thinking Partner Conversation New Conversation
Paragraph 5 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 4:49PM) : This is the second most important point in this guide (after paragraph 8). I would also recommend studying the Thinking Partners (see below for a link) more
New Thinking Partner Conversation New Conversation
Paragraph 5, Sentence 1 0
No sentence-level conversations. Start one.

Six strategies for getting better results

New Thinking Partner Conversation New Conversation
Paragraph 6 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 6, Sentence 1 0
No sentence-level conversations. Start one.

Write clear instructions

New Thinking Partner Conversation New Conversation
Paragraph 7 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 7, Sentence 1 0
No sentence-level conversations. Start one.

These models can’t read your mind. If outputs are too long, ask for brief replies. If outputs are too simple, ask for expert-level writing. If you dislike the format, demonstrate the format you’d like to see. The less the model has to guess at what you want, the more likely you’ll get it.

New Thinking Partner Conversation New Conversation
Paragraph 8 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 4:35PM) : This is the most important paragraph in this guide. It implies that prompting is an artform, a craft that can only be learned by trying, and trying, and experimenting, and trying again.
New Thinking Partner Conversation New Conversation
Paragraph 8, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 8, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 8, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 8, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 8, Sentence 5 0
No sentence-level conversations. Start one.

Tactics:

New Thinking Partner Conversation New Conversation
Paragraph 9 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 4:59PM) : Of these Tactics, given the way we have set things up on NowComment, I would give emphasis to the second, fourth and sixth tactics: Persona, Task or Intellectual Framework, and Shaping the Output.
New Thinking Partner Conversation New Conversation
Paragraph 9, Sentence 1 0
No sentence-level conversations. Start one.

Provide reference text

New Thinking Partner Conversation New Conversation
Paragraph 16 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 16, Sentence 1 0
No sentence-level conversations. Start one.

Language models can confidently invent fake answers, especially when asked about esoteric topics or for citations and URLs. In the same way that a sheet of notes can help a student do better on a test, providing reference text to these models can help in answering with fewer fabrications.

New Thinking Partner Conversation New Conversation
Paragraph 17 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 17, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 17, Sentence 2 0
No sentence-level conversations. Start one.

Tactics:

New Thinking Partner Conversation New Conversation
Paragraph 18 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 18, Sentence 1 0
No sentence-level conversations. Start one.

Split complex tasks into simpler subtasks

New Thinking Partner Conversation New Conversation
Paragraph 21 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 21, Sentence 1 0
No sentence-level conversations. Start one.

Just as it is good practice in software engineering to decompose a complex system into a set of modular components, the same is true of tasks submitted to a language model. Complex tasks tend to have higher error rates than simpler tasks. Furthermore, complex tasks can often be re-defined as a workflow of simpler tasks in which the outputs of earlier tasks are used to construct the inputs to later tasks.

New Thinking Partner Conversation New Conversation
Paragraph 22 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 22, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 22, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 22, Sentence 3 0
No sentence-level conversations. Start one.

Tactics:

New Thinking Partner Conversation New Conversation
Paragraph 23 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 23, Sentence 1 0
No sentence-level conversations. Start one.

Give the model time to “think”

New Thinking Partner Conversation New Conversation
Paragraph 27 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 27, Sentence 1 0
No sentence-level conversations. Start one.

If asked to multiply 17 by 28, you might not know it instantly, but can still work it out with time. Similarly, models make more reasoning errors when trying to answer right away, rather than taking time to work out an answer. Asking for a “chain of thought” before an answer can help the model reason its way toward correct answers more reliably.

New Thinking Partner Conversation New Conversation
Paragraph 28 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 28, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 28, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 28, Sentence 3 0
No sentence-level conversations. Start one.

Tactics:

New Thinking Partner Conversation New Conversation
Paragraph 29 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 29, Sentence 1 0
No sentence-level conversations. Start one.

Use external tools

New Thinking Partner Conversation New Conversation
Paragraph 33 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 33, Sentence 1 0
No sentence-level conversations. Start one.

Compensate for the weaknesses of the model by feeding it the outputs of other tools. For example, a text retrieval system (sometimes called RAG or retrieval augmented generation) can tell the model about relevant documents. A code execution engine like OpenAI’s Code Interpreter can help the model do math and run code. If a task can be done more reliably or efficiently by a tool rather than by a language model, offload it to get the best of both.

New Thinking Partner Conversation New Conversation
Paragraph 34 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 34, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 34, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 34, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 34, Sentence 4 0
No sentence-level conversations. Start one.

Tactics:

New Thinking Partner Conversation New Conversation
Paragraph 35 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 35, Sentence 1 0
No sentence-level conversations. Start one.

Test changes systematically

New Thinking Partner Conversation New Conversation
Paragraph 39 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 39, Sentence 1 0
No sentence-level conversations. Start one.

Improving performance is easier if you can measure it. In some cases a modification to a prompt will achieve better performance on a few isolated examples but lead to worse overall performance on a more representative set of examples. Therefore to be sure that a change is net positive to performance it may be necessary to define a comprehensive test suite (also known an as an “eval”).

New Thinking Partner Conversation New Conversation
Paragraph 40 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 40, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 40, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 40, Sentence 3 0
No sentence-level conversations. Start one.

Tactic:

New Thinking Partner Conversation New Conversation
Paragraph 41 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 41, Sentence 1 0
No sentence-level conversations. Start one.

Tactics

New Thinking Partner Conversation New Conversation
Paragraph 43 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 43, Sentence 1 0
No sentence-level conversations. Start one.

Each of the strategies listed above can be instantiated with specific tactics. These tactics are meant to provide ideas for things to try. They are by no means fully comprehensive, and you should feel free to try creative ideas not represented here.

New Thinking Partner Conversation New Conversation
Paragraph 44 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 44, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 44, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 44, Sentence 3 0
No sentence-level conversations. Start one.

Strategy: Write clear instructions

New Thinking Partner Conversation New Conversation
Paragraph 45 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 1:42PM) : Write clear instructions
New Thinking Partner Conversation New Conversation
Paragraph 45, Sentence 1 0
No sentence-level conversations. Start one.

Tactic: Include details in your query to get more relevant answers

New Thinking Partner Conversation New Conversation
Paragraph 46 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 46, Sentence 1 0
No sentence-level conversations. Start one.

In order to get a highly relevant response, make sure that requests provide any important details or context. Otherwise you are leaving it up to the model to guess what you mean.

New Thinking Partner Conversation New Conversation
Paragraph 47 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 47, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 47, Sentence 2 0
No sentence-level conversations. Start one.

Worse
New Thinking Partner Conversation New Conversation
Paragraph 48 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 48, Sentence 1 0
No sentence-level conversations. Start one.
Better
New Thinking Partner Conversation New Conversation
Paragraph 49 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 49, Sentence 1 0
No sentence-level conversations. Start one.
How do I add numbers in Excel?
New Thinking Partner Conversation New Conversation
Paragraph 50 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 50, Sentence 1 0
No sentence-level conversations. Start one.
How do I add up a row of dollar amounts in Excel? I want to do this automatically for a whole sheet of rows with all the totals ending up on the right in a column called “Total”.
New Thinking Partner Conversation New Conversation
Paragraph 51 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 51, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 51, Sentence 2 0
No sentence-level conversations. Start one.
Who’s president?
New Thinking Partner Conversation New Conversation
Paragraph 52 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 52, Sentence 1 0
No sentence-level conversations. Start one.
Who was the president of Mexico in 2021, and how frequently are elections held?
New Thinking Partner Conversation New Conversation
Paragraph 53 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 53, Sentence 1 0
No sentence-level conversations. Start one.
Write code to calculate the Fibonacci sequence.
New Thinking Partner Conversation New Conversation
Paragraph 54 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 54, Sentence 1 0
No sentence-level conversations. Start one.
Write a TypeScript function to efficiently calculate the Fibonacci sequence. Comment the code liberally to explain what each piece does and why it’s written that way.
New Thinking Partner Conversation New Conversation
Paragraph 55 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 55, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 55, Sentence 2 0
No sentence-level conversations. Start one.
Summarize the meeting notes.
New Thinking Partner Conversation New Conversation
Paragraph 56 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 56, Sentence 1 0
No sentence-level conversations. Start one.
Summarize the meeting notes in a single paragraph. Then write a markdown list of the speakers and each of their key points. Finally, list the next steps or action items suggested by the speakers, if any.
New Thinking Partner Conversation New Conversation
Paragraph 57 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 57, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 57, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 57, Sentence 3 0
No sentence-level conversations. Start one.

Tactic: Ask the model to adopt a persona

New Thinking Partner Conversation New Conversation
Paragraph 58 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 2:31PM) : Ask the model to adopt a persona
New Thinking Partner Conversation New Conversation
Paragraph 58, Sentence 1 0
No sentence-level conversations. Start one.

The system message can be used to specify the persona used by the model in its replies.

New Thinking Partner Conversation New Conversation
Paragraph 59 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 59, Sentence 1 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 60 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 60, Sentence 1 0
No sentence-level conversations. Start one.

When I ask for help to write something, you will reply with a document that contains at least one joke or playful comment in every paragraph.

New Thinking Partner Conversation New Conversation
Paragraph 61 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 61, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 62 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 62, Sentence 1 0
No sentence-level conversations. Start one.

Write a thank you note to my steel bolt vendor for getting the delivery in on time and in short notice. This made it possible for us to deliver an important order.

New Thinking Partner Conversation New Conversation
Paragraph 63 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 63, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 63, Sentence 2 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 64 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 64, Sentence 1 0
No sentence-level conversations. Start one.

Tactic: Use delimiters to clearly indicate distinct parts of the input

New Thinking Partner Conversation New Conversation
Paragraph 65 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 2:42PM) : Use delimiters to clearly indicate distinct parts of the input
New Thinking Partner Conversation New Conversation
Paragraph 65, Sentence 1 0
No sentence-level conversations. Start one.

Delimiters like triple quotation marks, XML tags, section titles, etc. can help demarcate sections of text to be treated differently.

New Thinking Partner Conversation New Conversation
Paragraph 66 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 66, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 67 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 67, Sentence 1 0
No sentence-level conversations. Start one.

Summarize the text delimited by triple quotes with a haiku. “””insert text here”””

New Thinking Partner Conversation New Conversation
Paragraph 68 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 68, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 69 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 69, Sentence 1 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 70 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 70, Sentence 1 0
No sentence-level conversations. Start one.

You will be provided with a pair of articles (delimited with XML tags) about the same topic. First summarize the arguments of each article. Then indicate which of them makes a better argument and explain why.

New Thinking Partner Conversation New Conversation
Paragraph 71 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 71, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 71, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 71, Sentence 3 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 72 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 72, Sentence 1 0
No sentence-level conversations. Start one.

insert first article here
insert second article here

New Thinking Partner Conversation New Conversation
Paragraph 73 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 73, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 74 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 74, Sentence 1 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 75 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 75, Sentence 1 0
No sentence-level conversations. Start one.

You will be provided with a thesis abstract and a suggested title for it. The thesis title should give the reader a good idea of the topic of the thesis but should also be eye-catching. If the title does not meet these criteria, suggest 5 alternatives.

New Thinking Partner Conversation New Conversation
Paragraph 76 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 76, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 76, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 76, Sentence 3 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 77 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 77, Sentence 1 0
No sentence-level conversations. Start one.

Abstract: insert abstract here Title: insert title here

New Thinking Partner Conversation New Conversation
Paragraph 78 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 78, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 79 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 79, Sentence 1 0
No sentence-level conversations. Start one.

For straightforward tasks such as these, using delimiters might not make a difference in the output quality. However, the more complex a task is the more important it is to disambiguate task details. Don’t make the model work to understand exactly what you are asking of them.

New Thinking Partner Conversation New Conversation
Paragraph 80 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 80, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 80, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 80, Sentence 3 0
No sentence-level conversations. Start one.

Tactic: Specify the steps required to complete a task

New Thinking Partner Conversation New Conversation
Paragraph 81 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 2:47PM) : Specify the steps required to complete a task
New Thinking Partner Conversation New Conversation
Paragraph 81, Sentence 1 0
No sentence-level conversations. Start one.

Some tasks are best specified as a sequence of steps. Writing the steps out explicitly can make it easier for the model to follow them.

New Thinking Partner Conversation New Conversation
Paragraph 82 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 82, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 82, Sentence 2 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 83 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 83, Sentence 1 0
No sentence-level conversations. Start one.

Use the following step-by-step instructions to respond to user inputs. Step 1 – The user will provide you with text in triple quotes. Summarize this text in one sentence with a prefix that says “Summary: “. Step 2 – Translate the summary from Step 1 into Spanish, with a prefix that says “Translation: “.

New Thinking Partner Conversation New Conversation
Paragraph 84 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 84, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 84, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 84, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 84, Sentence 4 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 85 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 85, Sentence 1 0
No sentence-level conversations. Start one.

“””insert text here”””

New Thinking Partner Conversation New Conversation
Paragraph 86 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 86, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 87 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 87, Sentence 1 0
No sentence-level conversations. Start one.

Tactic: Provide examples

New Thinking Partner Conversation New Conversation
Paragraph 88 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 4:35PM) : Provide examples
New Thinking Partner Conversation New Conversation
Paragraph 88, Sentence 1 0
No sentence-level conversations. Start one.

Providing general instructions that apply to all examples is generally more efficient than demonstrating all permutations of a task by example, but in some cases providing examples may be easier. For example, if you intend for the model to copy a particular style of responding to user queries which is difficult to describe explicitly. This is known as “few-shot” prompting.

New Thinking Partner Conversation New Conversation
Paragraph 89 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 89, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 89, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 89, Sentence 3 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 90 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 90, Sentence 1 0
No sentence-level conversations. Start one.

Answer in a consistent style.

New Thinking Partner Conversation New Conversation
Paragraph 91 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 91, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 92 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 92, Sentence 1 0
No sentence-level conversations. Start one.

Teach me about patience.

New Thinking Partner Conversation New Conversation
Paragraph 93 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 93, Sentence 1 0
No sentence-level conversations. Start one.

ASSISTANT

New Thinking Partner Conversation New Conversation
Paragraph 94 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 94, Sentence 1 0
No sentence-level conversations. Start one.

The river that carves the deepest valley flows from a modest spring; the grandest symphony originates from a single note; the most intricate tapestry begins with a solitary thread.

New Thinking Partner Conversation New Conversation
Paragraph 95 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 95, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 96 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 96, Sentence 1 0
No sentence-level conversations. Start one.

Teach me about the ocean.

New Thinking Partner Conversation New Conversation
Paragraph 97 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 97, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 98 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 98, Sentence 1 0
No sentence-level conversations. Start one.

Tactic: Specify the desired length of the output

New Thinking Partner Conversation New Conversation
Paragraph 99 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 4:53PM) : Specify the desired length of the output
New Thinking Partner Conversation New Conversation
Paragraph 99, Sentence 1 0
No sentence-level conversations. Start one.

You can ask the model to produce outputs that are of a given target length. The targeted output length can be specified in terms of the count of words, sentences, paragraphs, bullet points, etc. Note however that instructing the model to generate a specific number of words does not work with high precision. The model can more reliably generate outputs with a specific number of paragraphs or bullet points.

New Thinking Partner Conversation New Conversation
Paragraph 100 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 100, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 100, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 100, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 100, Sentence 4 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 4:54PM) : Cool tip! I didn't know that it's more accurate at specifying paragraphs and bullet points, not words--something which I did notice.

USER

New Thinking Partner Conversation New Conversation
Paragraph 101 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 101, Sentence 1 0
No sentence-level conversations. Start one.

Summarize the text delimited by triple quotes in about 50 words. “””insert text here”””

New Thinking Partner Conversation New Conversation
Paragraph 102 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 102, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 103 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 103, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 104 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 104, Sentence 1 0
No sentence-level conversations. Start one.

Summarize the text delimited by triple quotes in 2 paragraphs. “””insert text here”””

New Thinking Partner Conversation New Conversation
Paragraph 105 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 105, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 106 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 106, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 107 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 107, Sentence 1 0
No sentence-level conversations. Start one.

Summarize the text delimited by triple quotes in 3 bullet points. “””insert text here”””

New Thinking Partner Conversation New Conversation
Paragraph 108 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 108, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 109 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 109, Sentence 1 0
No sentence-level conversations. Start one.

Strategy: Provide reference text

New Thinking Partner Conversation New Conversation
Paragraph 110 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 110, Sentence 1 0
No sentence-level conversations. Start one.

Tactic: Instruct the model to answer using a reference text

New Thinking Partner Conversation New Conversation
Paragraph 111 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 5:22PM) : Instruct the model to answer using a reference text
New Thinking Partner Conversation New Conversation
Paragraph 111, Sentence 1 0
No sentence-level conversations. Start one.

If we can provide a model with trusted information that is relevant to the current query, then we can instruct the model to use the provided information to compose its answer.

New Thinking Partner Conversation New Conversation
Paragraph 112 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 112, Sentence 1 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 113 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 113, Sentence 1 0
No sentence-level conversations. Start one.

Use the provided articles delimited by triple quotes to answer questions. If the answer cannot be found in the articles, write “I could not find an answer.”

New Thinking Partner Conversation New Conversation
Paragraph 114 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 114, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 114, Sentence 2 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 115 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 115, Sentence 1 0
No sentence-level conversations. Start one.

Question:

New Thinking Partner Conversation New Conversation
Paragraph 116 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 116, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 117 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 117, Sentence 1 0
No sentence-level conversations. Start one.

Given that all models have limited context windows, we need some way to dynamically lookup information that is relevant to the question being asked. Embeddings can be used to implement efficient knowledge retrieval. See the tactic “Use embeddings-based search to implement efficient knowledge retrieval” for more details on how to implement this.

New Thinking Partner Conversation New Conversation
Paragraph 118 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 118, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 118, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 118, Sentence 3 0
No sentence-level conversations. Start one.

Tactic: Instruct the model to answer with citations from a reference text

New Thinking Partner Conversation New Conversation
Paragraph 119 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 5:26PM) : Instruct the model to answer with citations from a reference text
New Thinking Partner Conversation New Conversation
Paragraph 119, Sentence 1 0
No sentence-level conversations. Start one.

If the input has been supplemented with relevant knowledge, it’s straightforward to request that the model add citations to its answers by referencing passages from provided documents. Note that citations in the output can then be verified programmatically by string matching within the provided documents.

New Thinking Partner Conversation New Conversation
Paragraph 120 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 120, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 120, Sentence 2 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 121 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 121, Sentence 1 0
No sentence-level conversations. Start one.

You will be provided with a document delimited by triple quotes and a question. Your task is to answer the question using only the provided document and to cite the passage(s) of the document used to answer the question. If the document does not contain the information needed to answer this question then simply write: “Insufficient information.” If an answer to the question is provided, it must be annotated with a citation. Use the following format for to cite relevant passages ({“citation”: …}).

New Thinking Partner Conversation New Conversation
Paragraph 122 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 122, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 122, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 122, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 122, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 122, Sentence 5 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 123 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 123, Sentence 1 0
No sentence-level conversations. Start one.

“””””” Question:

New Thinking Partner Conversation New Conversation
Paragraph 124 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 124, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 125 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 125, Sentence 1 0
No sentence-level conversations. Start one.

Strategy: Split complex tasks into simpler subtasks

New Thinking Partner Conversation New Conversation
Paragraph 126 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 126, Sentence 1 0
No sentence-level conversations. Start one.

Tactic: Use intent classification to identify the most relevant instructions for a user query

New Thinking Partner Conversation New Conversation
Paragraph 127 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 6:29PM) : Use intent classification to identify the most relevant instructions for a user query
New Thinking Partner Conversation New Conversation
Paragraph 127, Sentence 1 0
No sentence-level conversations. Start one.

For tasks in which lots of independent sets of instructions are needed to handle different cases, it can be beneficial to first classify the type of query and to use that classification to determine which instructions are needed. This can be achieved by defining fixed categories and hardcoding instructions that are relevant for handling tasks in a given category. This process can also be applied recursively to decompose a task into a sequence of stages. The advantage of this approach is that each query will contain only those instructions that are required to perform the next stage of a task which can result in lower error rates compared to using a single query to perform the whole task. This can also result in lower costs since larger prompts cost more to run (see pricing information).

New Thinking Partner Conversation New Conversation
Paragraph 128 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 128, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 128, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 128, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 128, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 128, Sentence 5 0
No sentence-level conversations. Start one.

Suppose for example that for a customer service application, queries could be usefully classified as follows:

New Thinking Partner Conversation New Conversation
Paragraph 129 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 129, Sentence 1 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 130 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 130, Sentence 1 0
No sentence-level conversations. Start one.

You will be provided with customer service queries. Classify each query into a primary category and a secondary category. Provide your output in json format with the keys: primary and secondary. Primary categories: Billing, Technical Support, Account Management, or General Inquiry. Billing secondary categories: – Unsubscribe or upgrade – Add a payment method – Explanation for charge – Dispute a charge Technical Support secondary categories: – Troubleshooting – Device compatibility – Software updates Account Management secondary categories: – Password reset – Update personal information – Close account – Account security General Inquiry secondary categories: – Product information – Pricing – Feedback – Speak to a human

New Thinking Partner Conversation New Conversation
Paragraph 131 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 131, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 131, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 131, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 131, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 131, Sentence 5 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 132 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 132, Sentence 1 0
No sentence-level conversations. Start one.

I need to get my internet working again.

New Thinking Partner Conversation New Conversation
Paragraph 133 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 133, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 134 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 134, Sentence 1 0
No sentence-level conversations. Start one.

Based on the classification of the customer query, a set of more specific instructions can be provided to a model for it to handle next steps. For example, suppose the customer requires help with “troubleshooting”.

New Thinking Partner Conversation New Conversation
Paragraph 135 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 135, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 135, Sentence 2 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 136 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 136, Sentence 1 0
No sentence-level conversations. Start one.

You will be provided with customer service inquiries that require troubleshooting in a technical support context. Help the user by: – Ask them to check that all cables to/from the router are connected. Note that it is common for cables to come loose over time. – If all cables are connected and the issue persists, ask them which router model they are using – Now you will advise them how to restart their device: — If the model number is MTD-327J, advise them to push the red button and hold it for 5 seconds, then wait 5 minutes before testing the connection. — If the model number is MTD-327S, advise them to unplug and replug it, then wait 5 minutes before testing the connection. – If the customer’s issue persists after restarting the device and waiting 5 minutes, connect them to IT support by outputting {“IT support requested”}. – If the user starts asking questions that are unrelated to this topic then confirm if they would like to end the current chat about troubleshooting and classify their request according to the following scheme:

New Thinking Partner Conversation New Conversation
Paragraph 137 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 137, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 137, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 137, Sentence 3 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 138 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 138, Sentence 1 0
No sentence-level conversations. Start one.

I need to get my internet working again.

New Thinking Partner Conversation New Conversation
Paragraph 139 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 139, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 140 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 140, Sentence 1 0
No sentence-level conversations. Start one.

Notice that the model has been instructed to emit special strings to indicate when the state of the conversation changes. This enables us to turn our system into a state machine where the state determines which instructions are injected. By keeping track of state, what instructions are relevant at that state, and also optionally what state transitions are allowed from that state, we can put guardrails around the user experience that would be hard to achieve with a less structured approach.

New Thinking Partner Conversation New Conversation
Paragraph 141 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 141, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 141, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 141, Sentence 3 0
No sentence-level conversations. Start one.

Tactic: For dialogue applications that require very long conversations, summarize or filter previous dialogue

New Thinking Partner Conversation New Conversation
Paragraph 142 0
profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A (Dec 27 2023 6:32PM) : For dialogue applications that require very long conversations, summarize or filter previous dialogue
New Thinking Partner Conversation New Conversation
Paragraph 142, Sentence 1 0
No sentence-level conversations. Start one.

Since models have a fixed context length, dialogue between a user and an assistant in which the entire conversation is included in the context window cannot continue indefinitely.

New Thinking Partner Conversation New Conversation
Paragraph 143 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 143, Sentence 1 0
No sentence-level conversations. Start one.

There are various workarounds to this problem, one of which is to summarize previous turns in the conversation. Once the size of the input reaches a predetermined threshold length, this could trigger a query that summarizes part of the conversation and the summary of the prior conversation could be included as part of the system message. Alternatively, prior conversation could be summarized asynchronously in the background throughout the entire conversation.

New Thinking Partner Conversation New Conversation
Paragraph 144 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 144, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 144, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 144, Sentence 3 0
No sentence-level conversations. Start one.

An alternative solution is to dynamically select previous parts of the conversation that are most relevant to the current query. See the tactic “Use embeddings-based search to implement efficient knowledge retrieval”.

New Thinking Partner Conversation New Conversation
Paragraph 145 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 145, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 145, Sentence 2 0
No sentence-level conversations. Start one.

Tactic: Summarize long documents piecewise and construct a full summary recursively

New Thinking Partner Conversation New Conversation
Paragraph 146 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 146, Sentence 1 0
No sentence-level conversations. Start one.

Since models have a fixed context length, they cannot be used to summarize a text longer than the context length minus the length of the generated summary in a single query.

New Thinking Partner Conversation New Conversation
Paragraph 147 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 147, Sentence 1 0
No sentence-level conversations. Start one.

To summarize a very long document such as a book we can use a sequence of queries to summarize each section of the document. Section summaries can be concatenated and summarized producing summaries of summaries. This process can proceed recursively until an entire document is summarized. If it’s necessary to use information about earlier sections in order to make sense of later sections, then a further trick that can be useful is to include a running summary of the text that precedes any given point in the book while summarizing content at that point. The effectiveness of this procedure for summarizing books has been studied in previous research by OpenAI using variants of GPT-3.

New Thinking Partner Conversation New Conversation
Paragraph 148 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 148, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 148, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 148, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 148, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 148, Sentence 5 0
No sentence-level conversations. Start one.

Strategy: Give models time to “think”

New Thinking Partner Conversation New Conversation
Paragraph 149 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 149, Sentence 1 0
No sentence-level conversations. Start one.

Tactic: Instruct the model to work out its own solution before rushing to a conclusion

New Thinking Partner Conversation New Conversation
Paragraph 150 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 150, Sentence 1 0
No sentence-level conversations. Start one.

Sometimes we get better results when we explicitly instruct the model to reason from first principles before coming to a conclusion. Suppose for example we want a model to evaluate a student’s solution to a math problem. The most obvious way to approach this is to simply ask the model if the student’s solution is correct or not.

New Thinking Partner Conversation New Conversation
Paragraph 151 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 151, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 151, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 151, Sentence 3 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 152 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 152, Sentence 1 0
No sentence-level conversations. Start one.

Determine if the student’s solution is correct or not.

New Thinking Partner Conversation New Conversation
Paragraph 153 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 153, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 154 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 154, Sentence 1 0
No sentence-level conversations. Start one.

Problem Statement: I’m building a solar power installation and I need help working out the financials. – Land costs $100 / square foot – I can buy solar panels for $250 / square foot – I negotiated a contract for maintenance that will cost me a flat $100k per year, and an additional $10 / square foot What is the total cost for the first year of operations as a function of the number of square feet. Student’s Solution: Let x be the size of the installation in square feet. 1. Land cost: 100x 2. Solar panel cost: 250x 3. Maintenance cost: 100,000 + 100x Total cost: 100x + 250x + 100,000 + 100x = 450x + 100,000

New Thinking Partner Conversation New Conversation
Paragraph 155 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 155, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 155, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 155, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 155, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 155, Sentence 5 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 155, Sentence 6 0
No sentence-level conversations. Start one.

ASSISTANT

New Thinking Partner Conversation New Conversation
Paragraph 156 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 156, Sentence 1 0
No sentence-level conversations. Start one.

The student’s solution is correct.

New Thinking Partner Conversation New Conversation
Paragraph 157 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 157, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 158 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 158, Sentence 1 0
No sentence-level conversations. Start one.

But the student’s solution is actually not correct! We can get the model to successfully notice this by prompting the model to generate its own solution first.

New Thinking Partner Conversation New Conversation
Paragraph 159 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 159, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 159, Sentence 2 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 160 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 160, Sentence 1 0
No sentence-level conversations. Start one.

First work out your own solution to the problem. Then compare your solution to the student’s solution and evaluate if the student’s solution is correct or not. Don’t decide if the student’s solution is correct until you have done the problem yourself.

New Thinking Partner Conversation New Conversation
Paragraph 161 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 161, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 161, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 161, Sentence 3 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 162 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 162, Sentence 1 0
No sentence-level conversations. Start one.

Problem Statement: I’m building a solar power installation and I need help working out the financials. – Land costs $100 / square foot – I can buy solar panels for $250 / square foot – I negotiated a contract for maintenance that will cost me a flat $100k per year, and an additional $10 / square foot What is the total cost for the first year of operations as a function of the number of square feet. Student’s Solution: Let x be the size of the installation in square feet. 1. Land cost: 100x 2. Solar panel cost: 250x 3. Maintenance cost: 100,000 + 100x Total cost: 100x + 250x + 100,000 + 100x = 450x + 100,000

New Thinking Partner Conversation New Conversation
Paragraph 163 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 163, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 163, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 163, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 163, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 163, Sentence 5 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 163, Sentence 6 0
No sentence-level conversations. Start one.

ASSISTANT

New Thinking Partner Conversation New Conversation
Paragraph 164 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 164, Sentence 1 0
No sentence-level conversations. Start one.

Let x be the size of the installation in square feet. 1. Land cost: 100x 2. Solar panel cost: 250x 3. Maintenance cost: 100,000 + 10x Total cost: 100x + 250x + 100,000 + 10x = 360x + 100,000 The student’s solution is incorrect. They made an error in the maintenance cost calculation, using 100x instead of 10x. The correct total cost for the first year of operations is 360x + 100,000.

New Thinking Partner Conversation New Conversation
Paragraph 165 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 165, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 165, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 165, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 165, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 165, Sentence 5 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 165, Sentence 6 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 165, Sentence 7 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 166 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 166, Sentence 1 0
No sentence-level conversations. Start one.

Tactic: Use inner monologue or a sequence of queries to hide the model’s reasoning process

New Thinking Partner Conversation New Conversation
Paragraph 167 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 167, Sentence 1 0
No sentence-level conversations. Start one.

The previous tactic demonstrates that it is sometimes important for the model to reason in detail about a problem before answering a specific question. For some applications, the reasoning process that a model uses to arrive at a final answer would be inappropriate to share with the user. For example, in tutoring applications we may want to encourage students to work out their own answers, but a model’s reasoning process about the student’s solution could reveal the answer to the student.

New Thinking Partner Conversation New Conversation
Paragraph 168 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 168, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 168, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 168, Sentence 3 0
No sentence-level conversations. Start one.

Inner monologue is a tactic that can be used to mitigate this. The idea of inner monologue is to instruct the model to put parts of the output that are meant to be hidden from the user into a structured format that makes parsing them easy. Then before presenting the output to the user, the output is parsed and only part of the output is made visible.

New Thinking Partner Conversation New Conversation
Paragraph 169 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 169, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 169, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 169, Sentence 3 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 170 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 170, Sentence 1 0
No sentence-level conversations. Start one.

Follow these steps to answer the user queries. Step 1 – First work out your own solution to the problem. Don’t rely on the student’s solution since it may be incorrect. Enclose all your work for this step within triple quotes (“””). Step 2 – Compare your solution to the student’s solution and evaluate if the student’s solution is correct or not. Enclose all your work for this step within triple quotes (“””). Step 3 – If the student made a mistake, determine what hint you could give the student without giving away the answer. Enclose all your work for this step within triple quotes (“””). Step 4 – If the student made a mistake, provide the hint from the previous step to the student (outside of triple quotes). Instead of writing “Step 4 – …” write “Hint:”.

New Thinking Partner Conversation New Conversation
Paragraph 171 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 171, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 171, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 171, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 171, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 171, Sentence 5 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 171, Sentence 6 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 171, Sentence 7 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 171, Sentence 8 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 171, Sentence 9 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 171, Sentence 10 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 172 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 172, Sentence 1 0
No sentence-level conversations. Start one.

Problem Statement: Student Solution:

New Thinking Partner Conversation New Conversation
Paragraph 173 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 173, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 174 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 174, Sentence 1 0
No sentence-level conversations. Start one.

Alternatively, this can be achieved with a sequence of queries in which all except the last have their output hidden from the end user.

New Thinking Partner Conversation New Conversation
Paragraph 175 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 175, Sentence 1 0
No sentence-level conversations. Start one.

First, we can ask the model to solve the problem on its own. Since this initial query doesn’t require the student’s solution, it can be omitted. This provides the additional advantage that there is no chance that the model’s solution will be biased by the student’s attempted solution.

New Thinking Partner Conversation New Conversation
Paragraph 176 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 176, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 176, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 176, Sentence 3 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 177 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 177, Sentence 1 0
No sentence-level conversations. Start one.

New Thinking Partner Conversation New Conversation
Paragraph 178 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 178, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 179 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 179, Sentence 1 0
No sentence-level conversations. Start one.

Next, we can have the model use all available information to assess the correctness of the student’s solution.

New Thinking Partner Conversation New Conversation
Paragraph 180 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 180, Sentence 1 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 181 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 181, Sentence 1 0
No sentence-level conversations. Start one.

Compare your solution to the student’s solution and evaluate if the student’s solution is correct or not.

New Thinking Partner Conversation New Conversation
Paragraph 182 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 182, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 183 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 183, Sentence 1 0
No sentence-level conversations. Start one.

Problem statement: “””””” Your solution: “””””” Student’s solution: “”””””

New Thinking Partner Conversation New Conversation
Paragraph 184 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 184, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 185 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 185, Sentence 1 0
No sentence-level conversations. Start one.

Finally, we can let the model use its own analysis to construct a reply in the persona of a helpful tutor.

New Thinking Partner Conversation New Conversation
Paragraph 186 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 186, Sentence 1 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 187 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 187, Sentence 1 0
No sentence-level conversations. Start one.

You are a math tutor. If the student made an error, offer a hint to the student in a way that does not reveal the answer. If the student did not make an error, simply offer them an encouraging comment.

New Thinking Partner Conversation New Conversation
Paragraph 188 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 188, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 188, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 188, Sentence 3 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 189 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 189, Sentence 1 0
No sentence-level conversations. Start one.

Problem statement: “””””” Your solution: “””””” Student’s solution: “””””” Analysis: “”””””

New Thinking Partner Conversation New Conversation
Paragraph 190 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 190, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 191 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 191, Sentence 1 0
No sentence-level conversations. Start one.

Tactic: Ask the model if it missed anything on previous passes

New Thinking Partner Conversation New Conversation
Paragraph 192 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 192, Sentence 1 0
No sentence-level conversations. Start one.

Suppose that we are using a model to list excerpts from a source which are relevant to a particular question. After listing each excerpt the model needs to determine if it should start writing another or if it should stop. If the source document is large, it is common for a model to stop too early and fail to list all relevant excerpts. In that case, better performance can often be obtained by prompting the model with followup queries to find any excerpts it missed on previous passes.

New Thinking Partner Conversation New Conversation
Paragraph 193 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 193, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 193, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 193, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 193, Sentence 4 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 194 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 194, Sentence 1 0
No sentence-level conversations. Start one.

You will be provided with a document delimited by triple quotes. Your task is to select excerpts which pertain to the following question: “What significant paradigm shifts have occurred in the history of artificial intelligence.” Ensure that excerpts contain all relevant context needed to interpret them – in other words don’t extract small snippets that are missing important context. Provide output in JSON format as follows: [{“excerpt”: “…”}, … {“excerpt”: “…”}]

New Thinking Partner Conversation New Conversation
Paragraph 195 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 195, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 195, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 195, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 195, Sentence 4 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 196 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 196, Sentence 1 0
No sentence-level conversations. Start one.

“”””””

New Thinking Partner Conversation New Conversation
Paragraph 197 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 197, Sentence 1 0
No sentence-level conversations. Start one.

ASSISTANT

New Thinking Partner Conversation New Conversation
Paragraph 198 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 198, Sentence 1 0
No sentence-level conversations. Start one.

[{“excerpt”: “the model writes an excerpt here”}, … {“excerpt”: “the model writes another excerpt here”}]

New Thinking Partner Conversation New Conversation
Paragraph 199 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 199, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 200 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 200, Sentence 1 0
No sentence-level conversations. Start one.

Are there more relevant excerpts? Take care not to repeat excerpts. Also ensure that excerpts contain all relevant context needed to interpret them – in other words don’t extract small snippets that are missing important context.

New Thinking Partner Conversation New Conversation
Paragraph 201 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 201, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 201, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 201, Sentence 3 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 202 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 202, Sentence 1 0
No sentence-level conversations. Start one.

Strategy: Use external tools

New Thinking Partner Conversation New Conversation
Paragraph 203 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 203, Sentence 1 0
No sentence-level conversations. Start one.

Tactic: Use embeddings-based search to implement efficient knowledge retrieval

New Thinking Partner Conversation New Conversation
Paragraph 204 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 204, Sentence 1 0
No sentence-level conversations. Start one.

A model can leverage external sources of information if provided as part of its input. This can help the model to generate more informed and up-to-date responses. For example, if a user asks a question about a specific movie, it may be useful to add high quality information about the movie (e.g. actors, director, etc…) to the model’s input. Embeddings can be used to implement efficient knowledge retrieval, so that relevant information can be added to the model input dynamically at run-time.

New Thinking Partner Conversation New Conversation
Paragraph 205 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 205, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 205, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 205, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 205, Sentence 4 0
No sentence-level conversations. Start one.

A text embedding is a vector that can measure the relatedness between text strings. Similar or relevant strings will be closer together than unrelated strings. This fact, along with the existence of fast vector search algorithms means that embeddings can be used to implement efficient knowledge retrieval. In particular, a text corpus can be split up into chunks, and each chunk can be embedded and stored. Then a given query can be embedded and vector search can be performed to find the embedded chunks of text from the corpus that are most related to the query (i.e. closest together in the embedding space).

New Thinking Partner Conversation New Conversation
Paragraph 206 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 206, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 206, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 206, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 206, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 206, Sentence 5 0
No sentence-level conversations. Start one.

Example implementations can be found in the OpenAI Cookbook. See the tactic “Instruct the model to use retrieved knowledge to answer queries” for an example of how to use knowledge retrieval to minimize the likelihood that a model will make up incorrect facts.

New Thinking Partner Conversation New Conversation
Paragraph 207 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 207, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 207, Sentence 2 0
No sentence-level conversations. Start one.

Tactic: Use code execution to perform more accurate calculations or call external APIs

New Thinking Partner Conversation New Conversation
Paragraph 208 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 208, Sentence 1 0
No sentence-level conversations. Start one.

Language models cannot be relied upon to perform arithmetic or long calculations accurately on their own. In cases where this is needed, a model can be instructed to write and run code instead of making its own calculations. In particular, a model can be instructed to put code that is meant to be run into a designated format such as triple backtick. After an output is produced, the code can be extracted and run. Finally, if necessary, the output from the code execution engine (i.e. Python interpreter) can be provided as an input to the model for the next query.

New Thinking Partner Conversation New Conversation
Paragraph 209 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 209, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 209, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 209, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 209, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 209, Sentence 5 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 210 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 210, Sentence 1 0
No sentence-level conversations. Start one.

You can write and execute Python code by enclosing it in triple backticks, e.g. “`code goes here“`. Use this to perform calculations.

New Thinking Partner Conversation New Conversation
Paragraph 211 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 211, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 211, Sentence 2 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 212 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 212, Sentence 1 0
No sentence-level conversations. Start one.

Find all real-valued roots of the following polynomial: 3*x**5 – 5*x**4 – 3*x**3 – 7*x – 10.

New Thinking Partner Conversation New Conversation
Paragraph 213 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 213, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 214 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 214, Sentence 1 0
No sentence-level conversations. Start one.

Another good use case for code execution is calling external APIs. If a model is instructed in the proper use of an API, it can write code that makes use of it. A model can be instructed in how to use an API by providing it with documentation and/or code samples showing how to use the API.

New Thinking Partner Conversation New Conversation
Paragraph 215 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 215, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 215, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 215, Sentence 3 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 216 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 216, Sentence 1 0
No sentence-level conversations. Start one.

You can write and execute Python code by enclosing it in triple backticks. Also note that you have access to the following module to help users send messages to their friends: “`python import message message.write(to=”John”, message=”Hey, want to meetup after work?” )“`

New Thinking Partner Conversation New Conversation
Paragraph 217 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 217, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 217, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 217, Sentence 3 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 218 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 218, Sentence 1 0
No sentence-level conversations. Start one.

WARNING: Executing code produced by a model is not inherently safe and precautions should be taken in any application that seeks to do this. In particular, a sandboxed code execution environment is needed to limit the harm that untrusted code could cause.

New Thinking Partner Conversation New Conversation
Paragraph 219 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 219, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 219, Sentence 2 0
No sentence-level conversations. Start one.

Tactic: Give the model access to specific functions

New Thinking Partner Conversation New Conversation
Paragraph 220 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 220, Sentence 1 0
No sentence-level conversations. Start one.

The Chat Completions API allows passing a list of function descriptions in requests. This enables models to generate function arguments according to the provided schemas. Generated function arguments are returned by the API in JSON format and can be used to execute function calls. Output provided by function calls can then be fed back into a model in the following request to close the loop. This is the recommended way of using OpenAI models to call external functions. To learn more see the function calling section in our introductory text generation guide and more function calling examples in the OpenAI Cookbook.

New Thinking Partner Conversation New Conversation
Paragraph 221 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 221, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 221, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 221, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 221, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 221, Sentence 5 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 221, Sentence 6 0
No sentence-level conversations. Start one.

Strategy: Test changes systematically

New Thinking Partner Conversation New Conversation
Paragraph 222 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 222, Sentence 1 0
No sentence-level conversations. Start one.

Sometimes it can be hard to tell whether a change — e.g., a new instruction or a new design — makes your system better or worse. Looking at a few examples may hint at which is better, but with small sample sizes it can be hard to distinguish between a true improvement or random luck. Maybe the change helps performance on some inputs, but hurts performance on others.

New Thinking Partner Conversation New Conversation
Paragraph 223 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 223, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 223, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 223, Sentence 3 0
No sentence-level conversations. Start one.

Evaluation procedures (or “evals”) are useful for optimizing system designs. Good evals are:

New Thinking Partner Conversation New Conversation
Paragraph 224 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 224, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 224, Sentence 2 0
No sentence-level conversations. Start one.
  • Representative of real-world usage (or at least diverse)
  • New Thinking Partner Conversation New Conversation
    Paragraph 225 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 225, Sentence 1 0
    No sentence-level conversations. Start one.
  • Contain many test cases for greater statistical power (see table below for guidelines)
  • New Thinking Partner Conversation New Conversation
    Paragraph 226 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 226, Sentence 1 0
    No sentence-level conversations. Start one.
  • Easy to automate or repeat
  • New Thinking Partner Conversation New Conversation
    Paragraph 227 0
    No paragraph-level conversations. Start one.
    New Thinking Partner Conversation New Conversation
    Paragraph 227, Sentence 1 0
    No sentence-level conversations. Start one.

New Thinking Partner Conversation New Conversation
Paragraph 228 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 228, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 229 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 229, Sentence 1 0
No sentence-level conversations. Start one.
DIFFERENCE TO DETECT SAMPLE SIZE NEEDED FOR 95% CONFIDENCE
30%
New Thinking Partner Conversation New Conversation
Paragraph 230 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 230, Sentence 1 0
No sentence-level conversations. Start one.
~10
New Thinking Partner Conversation New Conversation
Paragraph 231 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 231, Sentence 1 0
No sentence-level conversations. Start one.
10%
New Thinking Partner Conversation New Conversation
Paragraph 232 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 232, Sentence 1 0
No sentence-level conversations. Start one.
~100
New Thinking Partner Conversation New Conversation
Paragraph 233 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 233, Sentence 1 0
No sentence-level conversations. Start one.
3%
New Thinking Partner Conversation New Conversation
Paragraph 234 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 234, Sentence 1 0
No sentence-level conversations. Start one.
~1,000
New Thinking Partner Conversation New Conversation
Paragraph 235 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 235, Sentence 1 0
No sentence-level conversations. Start one.
1%
New Thinking Partner Conversation New Conversation
Paragraph 236 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 236, Sentence 1 0
No sentence-level conversations. Start one.
~10,000
New Thinking Partner Conversation New Conversation
Paragraph 237 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 237, Sentence 1 0
No sentence-level conversations. Start one.

Evaluation of outputs can be done by computers, humans, or a mix. Computers can automate evals with objective criteria (e.g., questions with single correct answers) as well as some subjective or fuzzy criteria, in which model outputs are evaluated by other model queries. OpenAI Evals is an open-source software framework that provides tools for creating automated evals.

New Thinking Partner Conversation New Conversation
Paragraph 238 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 238, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 238, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 238, Sentence 3 0
No sentence-level conversations. Start one.

Model-based evals can be useful when there exists a range of possible outputs that would be considered equally high in quality (e.g. for questions with long answers). The boundary between what can be realistically evaluated with a model-based eval and what requires a human to evaluate is fuzzy and is constantly shifting as models become more capable. We encourage experimentation to figure out how well model-based evals can work for your use case.

New Thinking Partner Conversation New Conversation
Paragraph 239 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 239, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 239, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 239, Sentence 3 0
No sentence-level conversations. Start one.

Tactic: Evaluate model outputs with reference to gold-standard answers

New Thinking Partner Conversation New Conversation
Paragraph 240 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 240, Sentence 1 0
No sentence-level conversations. Start one.

Suppose it is known that the correct answer to a question should make reference to a specific set of known facts. Then we can use a model query to count how many of the required facts are included in the answer.

New Thinking Partner Conversation New Conversation
Paragraph 241 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 241, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 241, Sentence 2 0
No sentence-level conversations. Start one.

For example, using the following system message:

New Thinking Partner Conversation New Conversation
Paragraph 242 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 242, Sentence 1 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 243 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 243, Sentence 1 0
No sentence-level conversations. Start one.

You will be provided with text delimited by triple quotes that is supposed to be the answer to a question. Check if the following pieces of information are directly contained in the answer: – Neil Armstrong was the first person to walk on the moon. – The date Neil Armstrong first walked on the moon was July 21, 1969. For each of these points perform the following steps: 1 – Restate the point. 2 – Provide a citation from the answer which is closest to this point. 3 – Consider if someone reading the citation who doesn’t know the topic could directly infer the point. Explain why or why not before making up your mind. 4 – Write “yes” if the answer to 3 was yes, otherwise write “no”. Finally, provide a count of how many “yes” answers there are. Provide this count as {“count”: }.

New Thinking Partner Conversation New Conversation
Paragraph 244 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 244, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 244, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 244, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 244, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 244, Sentence 5 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 244, Sentence 6 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 244, Sentence 7 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 244, Sentence 8 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 244, Sentence 9 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 245 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 245, Sentence 1 0
No sentence-level conversations. Start one.

Here’s an example input where both points are satisfied:

New Thinking Partner Conversation New Conversation
Paragraph 246 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 246, Sentence 1 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 247 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 247, Sentence 1 0
No sentence-level conversations. Start one.

New Thinking Partner Conversation New Conversation
Paragraph 248 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 248, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 249 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 249, Sentence 1 0
No sentence-level conversations. Start one.

“””Neil Armstrong is famous for being the first human to set foot on the Moon. This historic event took place on July 21, 1969, during the Apollo 11 mission.”””

New Thinking Partner Conversation New Conversation
Paragraph 250 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 250, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 250, Sentence 2 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 251 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 251, Sentence 1 0
No sentence-level conversations. Start one.

Here’s an example input where only one point is satisfied:

New Thinking Partner Conversation New Conversation
Paragraph 252 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 252, Sentence 1 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 253 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 253, Sentence 1 0
No sentence-level conversations. Start one.

New Thinking Partner Conversation New Conversation
Paragraph 254 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 254, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 255 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 255, Sentence 1 0
No sentence-level conversations. Start one.

“””Neil Armstrong made history when he stepped off the lunar module, becoming the first person to walk on the moon.”””

New Thinking Partner Conversation New Conversation
Paragraph 256 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 256, Sentence 1 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 257 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 257, Sentence 1 0
No sentence-level conversations. Start one.

Here’s an example input where none are satisfied:

New Thinking Partner Conversation New Conversation
Paragraph 258 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 258, Sentence 1 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 259 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 259, Sentence 1 0
No sentence-level conversations. Start one.

New Thinking Partner Conversation New Conversation
Paragraph 260 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 260, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 261 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 261, Sentence 1 0
No sentence-level conversations. Start one.

“””In the summer of ’69, a voyage grand, Apollo 11, bold as legend’s hand. Armstrong took a step, history unfurled, “One small step,” he said, for a new world.”””

New Thinking Partner Conversation New Conversation
Paragraph 262 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 262, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 262, Sentence 2 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 263 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 263, Sentence 1 0
No sentence-level conversations. Start one.

There are many possible variants on this type of model-based eval. Consider the following variation which tracks the kind of overlap between the candidate answer and the gold-standard answer, and also tracks whether the candidate answer contradicts any part of the gold-standard answer.

New Thinking Partner Conversation New Conversation
Paragraph 264 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 264, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 264, Sentence 2 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 265 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 265, Sentence 1 0
No sentence-level conversations. Start one.

Use the following steps to respond to user inputs. Fully restate each step before proceeding. i.e. “Step 1: Reason…”. Step 1: Reason step-by-step about whether the information in the submitted answer compared to the expert answer is either: disjoint, equal, a subset, a superset, or overlapping (i.e. some intersection but not subset/superset). Step 2: Reason step-by-step about whether the submitted answer contradicts any aspect of the expert answer. Step 3: Output a JSON object structured like: {“type_of_overlap”: “disjoint” or “equal” or “subset” or “superset” or “overlapping”, “contradiction”: true or false}

New Thinking Partner Conversation New Conversation
Paragraph 266 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 266, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 266, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 266, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 266, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 266, Sentence 5 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 266, Sentence 6 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 267 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 267, Sentence 1 0
No sentence-level conversations. Start one.

Here’s an example input with a substandard answer which nonetheless does not contradict the expert answer:

New Thinking Partner Conversation New Conversation
Paragraph 268 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 268, Sentence 1 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 269 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 269, Sentence 1 0
No sentence-level conversations. Start one.

New Thinking Partner Conversation New Conversation
Paragraph 270 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 270, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 271 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 271, Sentence 1 0
No sentence-level conversations. Start one.

Question: “””What event is Neil Armstrong most famous for and on what date did it occur? Assume UTC time.””” Submitted Answer: “””Didn’t he walk on the moon or something?””” Expert Answer: “””Neil Armstrong is most famous for being the first person to walk on the moon. This historic event occurred on July 21, 1969.”””

New Thinking Partner Conversation New Conversation
Paragraph 272 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 272, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 272, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 272, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 272, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 272, Sentence 5 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 273 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 273, Sentence 1 0
No sentence-level conversations. Start one.

Here’s an example input with answer that directly contradicts the expert answer:

New Thinking Partner Conversation New Conversation
Paragraph 274 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 274, Sentence 1 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 275 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 275, Sentence 1 0
No sentence-level conversations. Start one.

New Thinking Partner Conversation New Conversation
Paragraph 276 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 276, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 277 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 277, Sentence 1 0
No sentence-level conversations. Start one.

Question: “””What event is Neil Armstrong most famous for and on what date did it occur? Assume UTC time.””” Submitted Answer: “””On the 21st of July 1969, Neil Armstrong became the second person to walk on the moon, following after Buzz Aldrin.””” Expert Answer: “””Neil Armstrong is most famous for being the first person to walk on the moon. This historic event occurred on July 21, 1969.”””

New Thinking Partner Conversation New Conversation
Paragraph 278 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 278, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 278, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 278, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 278, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 278, Sentence 5 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 279 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 279, Sentence 1 0
No sentence-level conversations. Start one.

Here’s an example input with a correct answer that also provides a bit more detail than is necessary:

New Thinking Partner Conversation New Conversation
Paragraph 280 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 280, Sentence 1 0
No sentence-level conversations. Start one.

SYSTEM

New Thinking Partner Conversation New Conversation
Paragraph 281 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 281, Sentence 1 0
No sentence-level conversations. Start one.

New Thinking Partner Conversation New Conversation
Paragraph 282 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 282, Sentence 1 0
No sentence-level conversations. Start one.

USER

New Thinking Partner Conversation New Conversation
Paragraph 283 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 283, Sentence 1 0
No sentence-level conversations. Start one.

Question: “””What event is Neil Armstrong most famous for and on what date did it occur? Assume UTC time.””” Submitted Answer: “””At approximately 02:56 UTC on July 21st 1969, Neil Armstrong became the first human to set foot on the lunar surface, marking a monumental achievement in human history.””” Expert Answer: “””Neil Armstrong is most famous for being the first person to walk on the moon. This historic event occurred on July 21, 1969.”””

New Thinking Partner Conversation New Conversation
Paragraph 284 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 284, Sentence 1 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 284, Sentence 2 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 284, Sentence 3 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 284, Sentence 4 0
No sentence-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 284, Sentence 5 0
No sentence-level conversations. Start one.

Open in Playground

New Thinking Partner Conversation New Conversation
Paragraph 285 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 285, Sentence 1 0
No sentence-level conversations. Start one.

Other resources

New Thinking Partner Conversation New Conversation
Paragraph 286 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 286, Sentence 1 0
No sentence-level conversations. Start one.

For more inspiration, visit the OpenAI Cookbook, which contains example code and also links to third-party resources such as:

New Thinking Partner Conversation New Conversation
Paragraph 287 0
No paragraph-level conversations. Start one.
New Thinking Partner Conversation New Conversation
Paragraph 287, Sentence 1 0
No sentence-level conversations. Start one.

DMU Timestamp: December 27, 2023 16:06

General Document Comments 0
New Thinking Partner Conversation Start a new Document-level conversation

profile_photo

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Dec 27
Paul A's Question

I’m the Tech Liaison for the New York City Writing Project. I… (more)

Paul A and/or Summarizer Tool (Dec 27 2023 11:53AM) : How would you sum it up for someone just starting to write prompts? more
Summarizer Tool with Paul A's edits:
Summarizer Tool
Provides an expanded summary, written for an 8th grader

Hey there! If you’re just starting to write prompts for artificial intelligence models like GPT-4, this is your go-to guide for creating prompts that get great results. GPT-4 and other large language models are kind of like super-smart robots that can understand and respond to the instructions you give them. But, to get the most out of these AI models, you need to be clear about what you want them to do.

The guide talks about different strategies and tips that can help you write good prompts. Firstly, make sure to provide enough details in your prompt so the model knows exactly what you want. Imagine you’re asking a genie for a wish; if you’re not specific, you might not get what you were hoping for.

For example, if a prompt is too vague, like just asking who the president is, the model might not know which country or time period you’re talking about. But if you ask who the president of Mexico was in 2021, you’ll get a much more accurate answer. The more details and context you provide, the better the AI can guess what you mean.

The guide also suggests techniques like asking the AI to pretend it’s someone else (like a professor or a comedian), using special markers to separate different parts of your prompt, and breaking down big tasks into smaller, easier chunks. Another cool trick is to give the model ‘time to think’; just like people sometimes need a moment to work out a problem, the AI can also come up with better answers if it doesn’t rush.

To ensure the answers you get are based on facts, you can provide the AI with trusted text to use as a reference. This helps to reduce made-up answers that are meant to sound convincing but aren’t actually true.

One more advanced tip is to use what’s called an “embeddings-based search” which is like giving the AI a quick way to look up information that’s relevant to your question. You can even tell the AI to run some code or use special functions to get things done, which is pretty nifty.

It’s also important to test out any changes you make to your prompts to make sure they’re really improvements. You can do this by comparing the new outputs with a set of already known good answers to see how well they match up.

If you’re looking for even more ideas, there are places like the OpenAI Cookbook where you can find examples, tools, guides, and courses that can help you learn more about writing awesome prompts.

Now that you’ve got the scoop on how to create prompts that work well, think about what you need from the AI, and try writing one. After all, practice makes perfect! And don’t forget—always be as clear as possible about what you want to know or do. If you craft your prompt like you’re explaining it to a very smart friend who just needs a bit of guidance, you should be all set.

After you’ve read this guide, why not try writing a prompt yourself and see if you can spot any other tips I didn’t mention? Share your thoughts, and let’s learn together!

Image
0 comments, 0 areas
add area
add comment
change display
Video
add comment

Quickstart: Commenting and Sharing

How to Comment
  • Click icons on the left to see existing comments.
  • Desktop/Laptop: double-click any text, highlight a section of an image, or add a comment while a video is playing to start a new conversation.
    Tablet/Phone: single click then click on the "Start One" link (look right or below).
  • Click "Reply" on a comment to join the conversation.
How to Share Documents
  1. "Upload" a new document.
  2. "Invite" others to it.

Logging in, please wait... Blue_on_grey_spinner