Clip big results
Read · 1 of 2
The biggest thing in the room
A web page, a log file or a database dump can be tens of thousands of tokens. One such result and the conversation is mostly noise.
Clip long tool outputs: keep the start, and add a note saying how much was cut, so the model knows there's more and can ask for a specific part.
Read this lesson as text
One giant tool result can eat the whole window. Cut it, and say you did.
The biggest thing in the room
A web page, a log file or a database dump can be tens of thousands of tokens. One such result and the conversation is mostly noise.
Clip long tool outputs: keep the start, and add a note saying how much was cut, so the model knows there's more and can ask for a specific part.
Exercise: Clip it
Input: a limit L, then n, then n tool outputs (one per line).
Print each output unchanged if it has at most L characters. Otherwise print its first L characters followed by [... X more characters cut].