WEBVTT

NOTE week09-clip2-react
NOTE Narration read by an AI-generated voice.
NOTE The clip draws its own caption along the bottom of the frame. These cues
NOTE sit there too, so that no part of the animation is ever covered.

1
00:00:00.150 --> 00:00:04.556
An agent works in a loop of
thought, action, and observation.

2
00:00:04.556 --> 00:00:11.115
Our task, for the synthetic patient
P001: is the potassium rising,

3
00:00:11.115 --> 00:00:13.550
and is it abnormal?

4
00:00:13.750 --> 00:00:19.280
First the model writes a thought: I
need the last three potassium results.

5
00:00:19.280 --> 00:00:23.255
Then it writes an action, a tool
call in JSON, naming the tool,

6
00:00:23.255 --> 00:00:29.083
get labs, and its arguments: the
patient, the test, and how many results.

7
00:00:29.283 --> 00:00:31.065
The program, not the model,

8
00:00:31.065 --> 00:00:36.396
runs the tool against the record and
appends the result to the context:

9
00:00:36.396 --> 00:00:42.083
4.6, 5.1, and 5.6 millimoles per liter.

10
00:00:42.283 --> 00:00:48.372
The model reads the observation and writes
a new thought: the potassium is rising,

11
00:00:48.372 --> 00:00:55.745
and 5.6 is above the usual upper limit
of about 5.0. Its last action is finish,

12
00:00:55.745 --> 00:00:58.750
with the answer and the values.

13
00:00:58.950 --> 00:01:03.613
A tool call is just text that the
model writes in an agreed format.

14
00:01:03.613 --> 00:01:08.022
ReAct got this behavior from a
few worked examples in the prompt,

15
00:01:08.022 --> 00:01:13.621
with no training at all. Today's models
are post-trained to write tool calls,

16
00:01:13.621 --> 00:01:15.950
as in week five.

17
00:01:16.150 --> 00:01:20.125
On ALFWorld, a text-based
benchmark of household tasks,

18
00:01:20.125 --> 00:01:25.666
the best of 6 ReAct prompts
succeeded 71% of the time,

19
00:01:25.666 --> 00:01:29.180
versus 45 for acting without thoughts.

20
00:01:29.180 --> 00:01:34.150
Even the worst ReAct prompt
beat the best acting-only one.

21
00:01:34.350 --> 00:01:41.649
On HotpotQA, multi-hop questions answered
from Wikipedia, ReAct alone scored 27.4,

22
00:01:41.649 --> 00:01:46.675
below chain of thought at 29.4.
Falling back to chain of thought

23
00:01:46.675 --> 00:01:52.683
with self-consistency when ReAct
got stuck did best, at 35.1.

24
00:01:52.883 --> 00:01:57.252
The authors labelled 50 failed
runs of each method by hand.

25
00:01:57.252 --> 00:02:01.645
Hallucination caused
56% of chain-of-thought

26
00:02:01.645 --> 00:02:03.532
failures and none of ReAct's.

27
00:02:03.532 --> 00:02:11.080
But 47% of ReAct's failures were reasoning
errors, such as repeating the same step.
