Memento Humani

A prompting guide that isn't really a prompting guide

Let’s start off by establishing a simple fact: there is no ultimate prompt and there is no ultimate prompt structure, just like there is no ultimate way to talk to humans. Ironically, I see personification of LLMs as a very common (and somewhat problematic) occurrence, but it seems to be thrown out the window the moment prompting strategies are being discussed, even though this might be one of the few cases where thinking of LLMs as human-like can be decently useful, if done correctly.

Of course there are examples of objectively good prompts and objectively bad prompts, but just like with good and bad communication, it’s incredibly context-dependent and can often only be judged in hindsight (usually by asking “Did I *actually *achieve what I was trying to achieve?”).

The philosophy

So we will treat good prompting like good communication, which can tell us a lot about how to get good at it:

Step 1: Say the thing you want to say. Step 2: Observe. Step 3: Learn from what you’ve seen.

And here is the nice part about LLMs: As users, we have full control over their memories! It doesn’t matter if our first attempt at communicating something fails, we can just erase that from the LLM’s memory and start from scratch. Another benefit we get from this is that we don’t have to be sure what exactly we want and can just find out on the fly by observing results until we get one we like (this is something you should *not *be doing with humans unless you’re in something like a brainstorming setting).

The practice

So how can we apply this?

  1. Start off by telling the LLM what you want it to do, in the clearest way you can.
  2. Let the LLM generate its answer. Is it what you wanted? Great, we’re done! Good job! It’s not what you wanted? Let’s observe and refine.
  3. Look at the LLM’s answer in relation to your prompt. What exactly did it get wrong? Did it misinterpret a part of your prompt? Did it lack some information? Is the answer alright, but just not to your taste?
  4. Edit your prompt to provide additional clarity, instructions (some step-by-step guidance can go a long way!) and information. Yes, edit. Try to avoid continuing the conversation to fix errors, as there is a solid body of research (1,2,3,4) suggesting that LLMs are steered to make more mistakes after an initial error.
  5. Repeat steps 3 and 4 as necessary.

I know this might not sound as sexy as “Here’s the ultimate prompt that will fix all your problems!”, but this approach will help you develop prompting as a skill. You will get better over time and your intuition will allow you to get more prompts right on the first try.

Since all of this was pretty abstract, here are a couple of more concrete tips: