← Table of Contents · Page 190 of 868
CONTEXT AS THE SCARCE RESOURCE
Part 9 of 12
PRACTICE LAB CONNECTION
In the running lab project of this book, you build a Resume Review Agent, which reads resumes and compares them to job postings.
In Chapter 66 you will add context management to it.
For this chapter's lab connection, add a context-budget check to the Resume Review Agent.
Before every model call, the agent should count the tokens in each category, compare them to the allowances you decided on, and print a short report such as "history 22,000 of 30,000, documents 38,000 of 40,000."
Then test the prompts below against it as resume folders grow large.
Try a folder with five resumes, then fifty, then five hundred, and watch where the budget breaks.
Writing down what happens at each size is excellent practice, because it teaches you where real limits appear.
Advertisement
Read Aloud:
0:00 / 0:00