Evals are not complicated

If you’re building applied AI features like AI agents, you need to measure how well they perform.

With traditional (deterministic) software, you can write a suite of unit tests, system tests, or end-to-end tests. These have a binary output, either the test passes or fails.

However, AI models are non-deterministic. This means that our measurements need to become qualitative (“how well did this agent using this model perform on this task?”) rather than binary or quantitative (“did this unit test pass? how many of the unit tests passed?”).

Instead of unit tests, we use evals.

Eval suite basics

For AI features like agentic workflows, you use traditional code to write an eval suite. This eval suite contains a static set of inputs representing your “golden tasks” (your core use cases/scenarios).

Each eval passes the input into your agent or other AI feature, and then a separate “judge model” objectively evaluates the result according to a rubric you provide it. The resulting grade or score is the result for that eval.

As far as types of evals, your suite includes:

  • End-to-end task evals. These are gating. Basically, “was the agent able to complete the task correctly, regardless of how they got there?”
  • Individual step evals. Was the agent able to select the right tool required for the step, etc.?
  • Deterministic checks. These are cheap, and some of the things we still care about are deterministic.

Deterministic checks might include:

  • was the agent able to call allowed tools?
  • was the output parsed correctly?
  • was the agent unable to call disallowed tools?
  • etc.

What stays the same, and what changes

What you measure in an eval suite (your core scenarios or “golden tasks”) should remain static. What changes (what you are evaluating) is the version of the prompt you’re using for your AI feature. You’re evaluating the qualitative result on the output, of the nuances of the prompt instructions used as input.

Each eval run should be labeled with the prompt version that was evaluated.

You can swap your judge model to a better one as they become available, but just be aware that this will render future results not directly comparable to past results. If this is important, you can re-run a subset of recent runs using the new judge model to get apples-to-apples results to calibrate to the new judge model.

RAG search evals

For retrieval evals, we measure precision and recall.

Basically, precision answers the question “what percentage of the retrieved results were relevant?” i.e. how much noise in the results are you squelching?

Recall answers the questions “what percentage of the relevant results were retrieved?” i.e. how many relevant results did you miss?

For retrieval evals, you might re-run them any time you update the stored content chunks, change the overlap percentage, change the proximity threshold for your vector search engine, etc.

Building a vigilance device for hypnagogia exploration

For a while now, I’ve wanted to build a vigilance device for exploring hypnagogia, the pre-dream state where the body is relaxed and hypnagogic imagery appears.

A handful of prominent figures have used a “drop technique” for this: Salvador Dali, Albert Einstein, Nikolai Tesla, Thomas Edison. Each one would sit or recline for a nap, close their eyes, and hold an object like a metal spoon, key, or ball bearings over a metal plate on the floor. As the body relaxes, hypnagogic imagery appears. As they drift off to sleep, further relaxation causes them drop the object, waking them up. Rinse and repeat.

I ordered some simple electronic components to build a device like a remote control, where you can just press and hold a normally-open button, such that releasing the button causes a pager motor to vibrate, stirring you from sleep. However, the enclosure was taking too long to ship.

8BitDo SN30 Game Controller

I realized that I could repurpose an 8BitDo bluetooth game controller and write some python to accomplish the same thing, and it’s been totally effective.

This is the repo for the python script. There’s a “press-and-hold” button, where releasing it causes the controller to vibrate. There’s also a “disable monitoring” button, which you can press to pause/turn off the action of the first button.

You can customize which buttons to use (the shoulder triggers have a lighter action, for example), and experiment with the grip. Pair your controller, start the script, go lay down or sit somewhere and start watching the movie theater on the back of your eyelids as your secondary visual cortex takes over. Enjoy!

ChatGPT voice mode + zalgotext = nightmare fuel

The glitch has since been patched, but for a while you could give ChatGPT custom instructions to respond only in zalgotext, and then use voice mode for some truly insane results.

One thing I think is interesting, is that each voice has it’s own unique way of freaking out, which could include babbling, talking about nonsense, sometimes cursing, sometimes breaking into hallucinated music, etc.

One model spontaneously generated a radio advertising break, including a complete commericial for Mint Mobile featuring Ryan Reynolds (or Gosling, I get them confused).

I’ve uploaded the audio I captured here so you can see how nutty it was. Not sure if it was the underlying model or the interaction between it and the TTS model, but GPT-5 was even crazier than GPT-4.

Presented for your… enjoyment?

GPT-4

Arbor

Breeze

Cove

Ember

Maple

Sol

Spruce

Vale

GPT-5

Arbor

Breeze

Cove

Ember

Juniper

Maple

Sol

Spruce

Vale