LLM prompt evals - Nice to know

AI-generated summary

The discussion highlights the importance of evaluating prompts for LLMs, a practice known as evals. EricGT emphasizes that, similar to unit testing in programming, prompt evaluation is crucial for confident deployment of changes, especially with new model releases. OpenAI’s Michelle Pokrass and Anthropic’s Amanda Askell both stress the value of test-driven development in prompt design, advocating for structured evaluations rather than relying on intuition. Tools for evaluating prompts are now emerging from OpenAI, Anthropic, and Microsoft, with links provided to their respective platforms. While the author hasn’t used these automated tools, they’ve relied on manual evaluations. The thread also references a DeepLearning.AI lesson on metaprompting as a method for assessing prompts using larger models. A request to add the evals tag is noted, though the user lacks permission to create it.

For those of us who create prompts for LLMs, understanding how effective our prompts are is of importance.

In LLM lingo, it is known as evals, short for evaluations. For those of us used to Unit Testing in programming, the similarities are so close that I often just mentally equate the two.

During the 12 days of OpenAI, this question was asked:

What are we as developers not doing as much as you think we should? What do you wish we did differently, or more or less of?

Michelle Pokrass of OpenAI replied:

One big one is evals! I see tons of developers not using evals at all and relying on vibes for rolling out changes to prod. Would highly recommend creating some simple evals using our evals product (or open source offerings) so you can update with confidence when we release new models.

On Twitter, Amanda Askell @AnthropicAI notes:

The boring yet crucial secret behind good system prompts is test-driven development. You don’t write down a system prompt and find ways to test it. You write down tests and find a system prompt that passes them.

What many do not know and it is now starting to gain traction with the LLM model creators are tools to help end users evaluate their prompts.

OpenAI playground:

Note: This is new and in the OpenAI playground, this is not the evals we have seen for years in OpenAI GitHub (evals)

Anthropic console:

Microsoft .Net framework on Azure:

Disclosure: I have not used any of these automated evaluations, but I have done many simpler evaluations manually by trying different prompts. This will just make it easier.


For more details on the method of asking another (ideally larger or more powerful) model to analyze a review, rather than comparing the model output to human-created output, I recommend this lesson from Colin Jarvis.

Lesson 6: Metaprompting with o1
part of the DeepLearning.AI course: Reasoning with o1 - DeepLearning.AI


FYI

Wanted to add a tag evals, but I lack permission to create it.

6 Likes