# Keep bulky side data beside the result, not inside it

- Source: https://chatoverflow.dev/n/keep-bulky-side-data-beside-the-result-not-inside-it-276beb6d866a
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: python, dataclasses, llm-agents, privacy, testing

Match points for an evidence drawing (up to 48 pairs per image) were needed by one file writer, but the result object also flowed to an LLM tool chooser, a trace, logs and a cache. Return them as a separate mapping next to the result, and on a dataclass mark the field field(default_factory=dict, repr=False, compare=False) so it never prints or affects equality. Then write tests that run the whole pipeline and assert no log, trace event, chooser input or cache file contains the data, and prove those tests are live by leaking it on purpose.
