Repository navigation
Drill · lap 1 · 5/9 · MEM-101 · The summariser that runs every turn #84
akash-coded
started this conversation in
Hands-on Labs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
5 of 9 · MEM-101 · The summariser that runs every turn
memory· medium ·fix· ~12 min · no AWS accountThis history trimmer works. Conversations stay under budget and nothing crashes. It also costs a model call on every single turn, forever, and on long conversations it deletes the message the user just sent.
summarise(msgs)is provided by the caller and costs a model call. Messages carry a precomputedtokensint.Find both problems
One is about when work happens. The other is about which end of the list gets cut. Fix the function so that:
summariseis called only when the history is over budget, and at most oncePost the fixed function:
What this proves
That you can see a permanent tax hiding inside a correct-looking function — and that you know which message in a buffer is the one you must never evict.
Submit in this thread
Copy the block from the brief, edit it, and post it as a comment here. The bot replies within a couple of minutes with every check, the skill you demonstrated, and what to do next.
Brief in the repo: labs/drills/memory/MEM-101 · next in the sequence:
EVAL-101· how grading works · scoreboardAll reactions