Image: images.contentstack.io · rights & removal
Distillation, not dilution
Reporting by Sophos Ransomware ResearchRead the original at sophos.com
Executive Summary
Sophos engineers developed a Case Investigation Agent for their Managed Detection and Response service, utilizing a distillation approach to handle oversized tool results that exceed standard language model context windows. Traditional methods like text chunking proved expensive, prone to silent failures, and generated excessive false positives by evaluating data in isolation. To solve this, the engineering team implemented a sandboxed Python execution environment using Pydantic Monty, allowing GPT-5.2 to write code, explore raw tool data locally, and surface only relevant intermediate outputs.
This code-mode distillation strategy achieved significant performance improvements over chunking during benchmark testing. Token usage dropped by roughly 92%, and latency remained flat and bounded regardless of payload size. Furthermore, an LLM-based blind judge preferred the distillation summaries in 96% of cases due to higher precision and fewer false alarms, though chunking retained a slight advantage in preserving a single buried indicator in a rare edge case. The findings demonstrate that giving models programmatic freedom to query raw data yields superior results compared to pre-filtering or rigid scaffolding.
Facts Only
Sophos engineers built a Case Investigation Agent for their Managed Detection and Response service.
The agent generates attack timelines, recommended actions, and verdicts supported by evidence gathered from various data-pulling and analysis tools.
GPT-4.1 initially encountered limitations when single tool calls returned payloads tokenizing to several million input tokens, exceeding the 1-million-token context window.
The engineering team tested chunking payloads, but found it suffered from silent failures, high costs, and noisy, isolated evaluations.
Sophos implemented "code mode" using Pydantic Monty, a sandboxed Python interpreter with no ambient authority, allowing models to programmatically filter data.
The distiller model was upgraded to GPT-5.2 to better handle reasoning and code generation tasks.
Testing across 25 production cases showed distillation reduced token consumption by an average of 92.6% compared to chunking.
Distillation latency remained flat between 80 and 115 seconds, independent of payload size, while chunking latency scaled unpredictably.
An LLM judge preferred distillation summaries in 96% of cases, primarily due to higher precision and fewer false alarms.
Deterministic recall evaluations showed distillation retained approximately 77% of high-value indicators across benchmarked compromise cases.
Full Take
This text functions as a technical research write-up detailing engineering problem-solving within an enterprise security architecture. The narrative presents a common friction point in modern AI deployment—context window exhaustion when handling unstructured telemetry—and walks through an iterative engineering process to resolve it.
The core paradigm shift demonstrated here moves away from the reflexive instinct to shrink data to fit the model, proposing instead that models be given computational environments to navigate raw data directly. This reverses the traditional workflow of pre-processing information for consumption, trusting the reasoning model to act as an active investigator rather than a passive summarizer. The transition from heavily scaffolded rules and predefined helper functions to a raw, unconstrained code-execution loop highlights a broader lesson in agentic design: structural guardrails often restrict a model's capacity for flexible problem-solving.
While the technical solution is robust, the underlying shift toward granting autonomous reasoning models direct programmatic access to sensitive telemetry environments underscores emerging architectural dependencies. As systems delegate data filtering to code-writing models, the integrity of the sandbox interpreter becomes a critical security perimeter. The success of this approach relies on precise boundary enforcement rather than heuristic pre-filtering, offering a compelling blueprint for scalable data management in high-volume analytical pipelines.
What assumptions about data reduction remain unchallenged when we shift the burden of filtering onto the model itself? How might the absence of predefined helper functions change the reproducibility of agent-driven investigations over time?
Autonomy check: No autonomy signals.
From the original · Sophos Ransomware Research
As part of Sophos’ Managed Detection and Response (MDR) service, our engineers built a Case Investigation Agent. For each case it’s deployed on, the agent produces an attack timeline, recommended actions , and a verdict with supporting evidence, all of which are reviewed by a human analyst.Read the full story at sophos.com
Sentinel unavailable
The automated check of the source article's wording did not complete, so no result is shown.
This looks only at the wording of the original source article, not at this page's AI-written sections. A small local AI model made this estimate. It has not been checked against known human and machine texts, so treat it as provisional. It cannot show who wrote an article.
