Skip to main content
Machine-assisted translation of the Hebrew original, awaiting the lecturer's review.

Session 6 — Planning and decisions

Session 6 of 13TheoryDraft5 min read

Draft for the lecturer's approval. This is preliminary study material. It does not replace guidance published in Moodle, and it does not set any date or grade.

Goals​

  • Distinguish between a plan written in advance and a decision after every observation.
  • Phrase a stop condition before the loop runs.
  • See when splitting into two roles adds information, and when it only doubles the work.

Two forms​

In a fixed workflow the order of steps is known. It is cheap and easy to explain, and blind after the first step if the observation contradicts an assumption.

In an adaptive agent every observation can change the next action. It pays for this with more calls, and the decision can be read if it is written to a log.

Same question: does QuickScreen meet both requirements? Both policies are written in advance.

Fixed workflow, k=1, budget 2

stopped

The model-call budget ran out. This is a technical stop, not proof that the collection has no answer.

Agent that continues after the observation, k=2

answered

Does not meet the joint requirement: recall of 90% is below 95%, and the time reduction of 40% is above 30%. Sources: P:1, C:1.

Two ways to plan​

Interleaved (ReAct): a short thought, an action, an observation, and around again. Each step is set after seeing the result of the previous one. It fits when you cannot know in advance what retrieval will return.

Plan, then execute: first a list of steps, then execution in order. The plan is easy to check before anything runs, and it can be approved. The price: if step 2 returns something unexpected, you need a rule that decides when to write a new plan.

In both, someone has to check that the task was completed. A plan carried out to the end is not proof that the answer is right.

Stop condition and budget​

A stop condition should be one of these, explicitly: enough evidence was found, the available evidence is not enough, or a budget or a tool ran out. Do not mix the third with the second.

Before the loop runs, write three things: what counts as success, how many steps or calls are allowed, and what is returned when the budget runs out. Lab 3 tests such a case: with only one source, the status is "need another retrieval", not an answer.

Division of work​

Two agents are justified when each has a different window, tools or sources, and when there is a rule for contradictions. The same task for both, without a boundary, produces duplication. Session 11 tests this in code. Here it is enough to sketch who sends to whom, what must not overlap, and who signs off on the answer.

In the demo above, both policies answer the same question about QuickScreen. Write a three-step plan for the fixed workflow. Mark the step where the observation should have changed the plan, and write the rule that would have detected it. Does that rule turn the workflow into an agent?

Check your understanding​

The plan was carried out in full, but retrieval in step 2 returned an old abstract instead of the correction. What is the right status?

Pick an answer to see the explanation. There is no grade here.

Reading​

Yao et al., ReAct: Synergizing Reasoning and Acting in Language Models, ICLR 2023. arXiv:2210.03629. The abstract and figure 1.

Summary​

Found a mistake on this page? Email the lecturer

Accessibility settings

These settings change how this site looks on this device only. They are saved in this browser.

Text

Colour

Light and dark mode are in the top bar, next to search.

Reading and navigation