← Table of Contents · Page 681 of 868
PROJECT TWO - ADDING CONTEXT MANAGEMENT
Part 8 of 11
PRACTICE LAB CONNECTION
Stage 2 deliverables.
Your project now has context_builder.py, compaction.py, an updated main_loop.py, make_more_data.py, a progress_notes.md that appears after a run, and a sample_data folder expanded to twenty-five fictional resumes.
Sample data.
Resumes 06 through 25 are invented, and numbers 12 and 21 are the two unusually long ones.
Acceptance criteria for Stage 2.
First, the full batch of twenty-five stays within a token budget end to end, and you should choose and write down a budget number for yourself, for example a ceiling based on the AFTER figure with some safety room.
Second, after a simulated restart the agent reads progress_notes.md and resumes without reprocessing finished resumes.
Third, the before and after comparison shows a measured reduction in tokens with no drop in report quality, meaning the reports match.
A reminder about the planted flaw.
Notice that the restart test works only because the notes file makes the agent skip finished work.
If you delete progress_notes.md and run again, every report is silently replaced.
That is the Stage 1 write_report flaw still waiting for you in Chapter 67.
Make a version-control save labeled stage2.
Advertisement
Read Aloud:
0:00 / 0:00