You are signed in. Close

You are signed out. Close

Thank you. Your subscription has started. Close

Thank you. You will get an email when a new comic comes out. Close

Almost done. Check your inbox and press the button in our email to confirm. Close

We could not check that you are a person. Please try again. Close

We could not confirm your payment. If you paid, use the link "Sign in" at the bottom of the page. Close

Something went wrong on our side. Please try again in a moment. Close

Prompt engineering: why the same question gets a better answer when you ask it well

Two people ask an AI chatbot for the same thing. One gets a plain answer that could be about anyone. The other gets exactly what she needed. It was the same chatbot, and nothing inside it changed, only the text it got. See why, through a small choir and its first concert: the context of a prompt, few-shot examples, role prompts like "you are an expert", chain of thought, and the one thing no prompt trick can do.

Questions this comic answers

  1. Why does ChatGPT give such general answers to short prompts?

    ChatGPT gives general answers to short prompts because it writes the words that most often follow a prompt like yours. A short prompt fits thousands of different cases, so the likely words are the ones that fit all of them.

    Read episode 1 »
  2. Why do details in a prompt give a better AI answer?

    Details in a prompt give a better AI answer because each one rules out the texts that do not fit it. The model then writes words that fit texts like yours, and a detail even brings words you did not ask for.

    Read episode 2 »
  3. How can a few examples in a prompt teach an AI model a task?

    A few examples in a prompt can teach an AI model a task without changing the model at all. Two examples of a new style are often enough for the AI to write a third one in that style.

    Read episode 3 »
  4. Does telling ChatGPT "you are an expert" make its answers better?

    Telling ChatGPT "you are an expert" changes how the answer sounds: its words, its tone and how hard it is. Researchers tested 162 roles on questions of fact, and on average the answers were not more right.

    Read episode 4 »
  5. Why does "think step by step" make AI better at math?

    "Think step by step" makes AI better at math because the model then writes the middle results before the final answer. In a 2022 test, this one line took a model from 18 right answers out of 100 to 79.

    Read episode 5 »
  6. Why can't a better prompt make ChatGPT know new facts?

    A better prompt cannot make ChatGPT know new facts because a prompt only changes which words are likely. When a fact was never in what the model read, no wording makes the right words likely, and the model guesses.

    Read episode 6 »