recipe
Token-checked LLM call
· 2 min read
Prevents silent truncation - the model never sees a prompt it can only half-fit. Count tokens before sending to an LLM - abort if too large.
tag
4 posts tagged #tok
Prevents silent truncation - the model never sees a prompt it can only half-fit. Count tokens before sending to an LLM - abort if too large.
Catches oversized pages before the API call - no wasted request on a doc that won't fit in context. Grab a URL, check token count, then summarise ...
Prevents failure at job 847 of 10,000 - throttle paces filenames so each API call respects the rate limit. Process a large document set without ...
When agents handle user data, mask before any logging or storage - secrets should never reach an LLM or a kv store unredacted. Full guard pipeline - ...