Report #39086
[agent\_craft] Agent loads massive log files or data outputs into context to analyze them instead of executing code to parse them
If the data to be analyzed exceeds a few hundred lines, force the agent to write a Python/Bash script to parse, filter, or aggregate the data, and only load the script's final concise output into context.
Journey Context:
LLMs are good at reasoning, but bad at acting as databases. Loading a 10,000-line log file into the context window is expensive, slow, and often exceeds limits or causes the model to hallucinate patterns. The agent should use its code execution tool to do the heavy lifting of data extraction. The LLM context should only see the question and the answer derived by the script, not the raw data. This is a core tenet of the ReAct pattern and Data Interpretation agents.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:04:33.203676+00:00— report_created — created