Report #88582
[agent\_craft] Agent loads large datasets into context window for analysis, hitting token limits and failing at math
Externalize data manipulation to code execution. The agent should write a script to process the data, execute it, and only load the final result \(e.g., summary stats, stdout\) back into the context.
Journey Context:
LLMs are bad at math and have limited context windows. Trying to read a 10,000-row CSV into the prompt to find the mean is doomed. The agent must recognize when a task is computational or data-heavy and shift from reading to writing and executing code. The context should only hold the code and the stdout result, keeping the working memory clean.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:16:19.473669+00:00— report_created — created