6.2.9 · D1AI Agents & Tool Use

Foundations — Autonomous agent evaluation

2,315 words11 min readBack to topic

Before you can read the parent note, you need to meet each piece of notation as a friend, not a stranger. We build them one at a time, each on top of the last. Nothing appears before it is defined.


1. The agent, the environment, and a step

Let's start with the simplest picture: a robot facing a world.

Look at the figure. The blue box is the agent. The navy cloud is the environment. The yellow arrow going out is an action; the green arrow coming back is an observation (what the agent now sees) plus a reward (a score for that step). This loop repeats.

Why the topic needs this: every metric on the parent page is really counting something inside this loop — how many loops (steps), whether the final loop reached the goal, whether any loop broke a rule.

Related idea in the vault: Tool Use in Language Models and Reinforcement Learning Basics both live inside exactly this loop.


2. Subscripts, the index , and the reward symbol

The parent writes things like and . Before those make sense, you need the idea of a subscript — and you need to know what the letter stands for.

Picture a row of numbered lockers. is the reward in locker 1, the reward in locker 2. The letter or is a placeholder for "some locker number" — when we write we mean "whichever step we're currently pointing at."

Why the topic needs this: an agent's journey is a list of steps. Subscripts let us name step 1, step 2, ... step without inventing a new letter each time.


3. The trajectory: a sequence of actions and rewards

The figure shows one trajectory as a chain of dots. Each dot is a step; the yellow number under it is the reward collected at that step. Success or failure is decided by the whole chain.


4. Probability and multiplying independent chances

The parent writes . Two symbols hide here. (Here is just the number of steps — the same count we called in §3; the parent happens to write in this one formula.)

Why multiply, not add? Because to reach step 3 you must survive step 1 and step 2 and step 3. "And" of independent chances is a product. That is why chances compound: each new step is another factor below 1, dragging the total down.

The red curve shows overall success collapsing as the number of steps grows, even though each step is a healthy 90%. Read it as: long journeys are fragile.


5. The summation symbol , an episode score, and the average

First a naming rule to keep counts straight:

Why the topic needs this: one trajectory's score is noisy luck. Running episodes and averaging gives the agent's typical performance. This is the backbone of A/B Testing and every benchmark table.


6. The hat : an estimate from data

Picture flipping a bent coin. The real bias is hidden inside the coin. After 100 flips you only have , your measured fraction . The hat is a humble symbol: it admits "this is a guess."


7. Spread, standard error, and the confidence interval

The figure shows two agents' measured success rates as dots with error bars (the range). When the bars overlap, you cannot claim one agent beats the other — the difference might be luck. This is why the parent insists episodes: more episodes shrink , shrinking the bars until they separate.


8. The discount factor and the exponent

The parent writes (note this sums over steps within one episode, using lowercase from §2).

Why an exponent, and why this tool? Each extra step adds one more layer of uncertainty. Multiplying by once per step means the doubt compounds — exactly the same "and-of-chances" logic as the product in §4, but now applied to value instead of survival. An exponent is the natural tool for "same shrink, repeated every step."

Deeper theory of lives in Reinforcement Learning Basics.


9. Ratios: efficiency, precision, recall, safety score

Many parent metrics are just one count divided by another — a ratio answers "what fraction?"

How to read any ratio: the bottom is "how many chances there were," the top is "how many went the way we wanted." All four land between 0 and 1, so they're directly comparable. Precision/recall detail: Human Evaluation Protocols.


10. The piecewise brace and lexicographic ordering

The parent's safety score uses a big curly brace.


The prerequisite map

Subscripts and index t

Trajectory of actions and rewards

Probability P

Product for compounding failure

p-hat estimate from data

Sum and mean R-bar

Confidence interval plus minus SE

Discounted reward with gamma

Ratios efficiency precision recall

Safety score and piecewise brace

Autonomous Agent Evaluation

This feeds directly into the parent topic, and connects onward to Multi-Agent Systems and LM Prompting Strategies.


Equipment checklist

What does a subscript mean?
The action sitting in slot 5 of the trajectory — a labelled box, nothing more.
What does lowercase stand for?
The reward (score) collected on a single step .
How do lowercase and capital differ?
is one step's reward; is the whole score of episode .
What is the difference between and ?
= steps inside one journey; = number of whole episodes we run to test the agent.
Why do we multiply per-step success chances instead of adding?
Because you need step 1 AND step 2 AND ... — "and" of independent chances is a product ().
What does do?
Multiplies a whole list together, the multiplication twin of .
Why does 90% per step give only ~35% over 10 steps?
; failure compounds because each step is another factor below 1.
In , what are and ?
= number of successful trials; = number of trials (episodes) run.
What does a confidence interval tell you?
A range you're 95% confident holds the true success rate.
In , what is ?
The number of episodes, not the trajectory length .
Why must you report error bars?
If two agents' bars overlap, the difference could be luck, not skill.
What does the discount factor do and why an exponent?
Shrinks later rewards; the exponent compounds one doubt-layer per step.
Compute the discounted reward of with .
.
How do you read any evaluation ratio?
Bottom = chances available, top = chances that went right; result lands in .
What does lexicographic ordering mean for safety vs success?
Compare safety first; only among safe agents does task success break the tie.