← Table of Contents · Page 263 of 868

BUDGETS AND RESOURCE LIMITS

Part 6 of 9

CHOOSING SENSIBLE BUDGET VALUES Choosing a budget number can feel like guessing, but you can ground it in evidence. Start by running the agent on a sample of real tasks with generous limits and recording how many steps, tokens, and seconds each task actually used. Then look at the spread of those numbers, not only the average. If most tasks finish in eight steps and a few take twenty, a limit of thirty leaves room for the hard cases while still stopping a runaway loop. Set a soft limit lower than the hard limit, so that the agent receives a warning that it is running low and can wrap up gracefully before it is cut off. Review the numbers regularly, because tasks, prompts, and models change over time. When a limit is hit often, ask whether the limit is wrong or whether the agent is wasting effort, and investigate before simply raising it. BUDGETS IN THE PRACTICE LAB In the Practice Lab you will add a simple step limit and a rough token count in Chapter 65. Later, in Chapter 69, you will add a batch budget that covers many resumes at once. Try this small experiment before you move on. Run the lab agent with a step limit of three and watch it stop early with a clear message. Then raise the limit to ten and watch it finish. The difference teaches you that a budget is not only a safety device but also a way to learn how much work a task really needs.
Advertisement
Read Aloud:
0:00 / 0:00