Data for agents
A final answer records what the system concluded. A trajectory records how it got there — which is where the diagnosis, the training signal, and most of the privacy exposure all live.
8.1The Trajectory Is the Unit of Data
Supervised learning trained a generation of engineers to think of a datum as an input paired with a correct output. For an agentic system that framing loses most of the information the system produced. A single request to an agent generates a sequence of model calls, tool invocations, arguments, observations returned by the environment, and finally a stopping decision and an outcome. The pair consisting of the original request and the final answer summarizes that sequence into two fields, discarding the record of how the system got there. Since almost every interesting property of an agent is a property of the path rather than the endpoint, the unit of data for an agentic system is the trajectory: the full ordered record of one execution.
The practical argument for this becomes clear the first time a production agent produces a wrong answer. With input-output pairs, the available information is that the answer was wrong, which supports one action: adding the case to a list of failures. With trajectories, the record shows that the agent called the billing tool with a malformed date range, received an empty result, treated the empty result as evidence that no invoices existed, and confidently reported that the account had no charges. That record supports several specific actions, including tightening the tool's argument validation, changing the tool to return an explicit error rather than an empty list, and adding an instruction about how to interpret empty results. The difference in diagnostic power is not incremental.
A trajectory record that is useful for later work contains six categories of field. The first is the invocation context: the request, the system prompt version, the model identifier and decoding parameters, the tool set available, and a timestamp, all of which are needed for reproduction and none of which are usually captured completely on the first attempt. The second is the sequence of intermediate calls in order, each with its own model identifier and its own token counts, because a trajectory whose steps cannot be individually costed cannot be optimized for cost. The third is the arguments passed to each tool, exactly as constructed, since malformed arguments are among the most common agent failures and a summarized argument log hides precisely the malformation that caused the problem.
The fourth category is the raw observation returned by each tool, before any truncation or reformatting the harness applied. This one is skipped more often than any other because raw observations are large, and skipping it is a mistake that surfaces later as an unanswerable question. When an agent behaves strangely after a tool call, the first thing to check is what the tool actually returned, and if the log holds only a truncated or prettified version, the investigation stops. Storage for raw observations should be treated as an operational cost with a retention policy rather than as an optional field. The fifth category is the stop reason, which distinguishes a model that emitted a final answer from a run that hit the step cap, exhausted its token budget, timed out, or crashed. Aggregate metrics that mix these together are misleading, since a system whose failures are ten percent wrong answers and one that hits the step cap ten percent of the time need entirely different fixes and look identical without this field.
Sixth is the outcome, which is whatever downstream signal indicates whether the run achieved its purpose. Sometimes this is available immediately, as when a generated script runs or fails to run. Sometimes it arrives hours later, as when a user accepts a draft, edits it, or files a complaint. Trajectory records need a stable identifier and a schema that permits outcome fields to be attached after the fact, because the outcome is frequently the last field to become known and the most valuable one to have.
| TRACE FIELD | WHY IT IS NEEDED | COST OF OMITTING IT |
|---|---|---|
| Invocation context (prompt version, model, params) | Reproduction and A/B attribution | Failures cannot be reproduced after a prompt change |
| Ordered intermediate calls with token counts | Per-step cost and latency attribution | Cost optimization has no target |
| Tool arguments as constructed | Malformed arguments are a top failure mode | The malformation that caused the bug is invisible |
| Raw observations, pre-truncation | Explains why the model turned where it did | Investigations dead-end at the tool boundary |
| Stop reason | Separates answered from capped, timed out, crashed | Distinct failure classes are averaged into one number |
| Outcome, attachable later | The only signal of whether the run worked | Nothing can be filtered, ranked, or trained on |
step = {"i": 3, "kind": "tool", "name": "billing.invoices",
"args": {"account": "A-91", "from": "2026-13-01"}, # raw, as sent
"obs_ref": "blob://obs/9f2c", # raw observation, not truncated
"obs_bytes": 48213, "ms": 120, "tok_in": 0, "tok_out": 0}
trace = {"id": "t-4471", "prompt_ver": "v12", "model": "m-2",
"steps": [...], "stop": "step_cap", # not "done"
"outcome": None} # attached later
assert trace["stop"] in {"answered","step_cap","tok_cap","timeout","error"}Adopting the trajectory as the unit creates a difficulty that input-output pairs never had, and it is the central technical problem in this area. A trajectory of twelve steps ended badly. Which step should be blamed? This is the credit assignment problem, and in agentic systems it is unusually hard for three reasons. The first is delay: the action that doomed the run is often many steps before the point where the failure became visible, as in a search query issued at step two that returned plausible but off-topic documents, on which steps three through eleven then built a coherent and wrong analysis. The steps near the failure look locally reasonable, because they were reasonable given the poisoned context they inherited.
The second reason is that success is not evidence that every step was good. A trajectory can reach the right answer through a wasteful path, a lucky guess, or a compensating pair of errors. Training on complete successful trajectories, which is the standard cheap procedure, therefore reinforces whatever the successful runs contained, including the detours. Over several iterations this produces a system that solves problems correctly and expensively, with behaviors nobody chose and nobody can locate in a prompt. The third reason is that the counterfactual is generally unavailable. Determining whether step four was the error requires knowing what would have happened had step four been different, and unless the environment can be reset and replayed, that comparison cannot be made. Environments with cheap resets, such as code sandboxes and simulators, permit real credit assignment. Environments that touch the outside world, such as anything that sends an email or writes to a production database, generally do not.
Three practical approximations are in common use, and each should be understood as an approximation. Uniform attribution treats every step in a failed trajectory as equally at fault, which is cheap, requires nothing beyond the outcome label, and is badly wrong whenever one early step caused everything downstream. Last-step attribution blames the final action before the failure, which is right for the class of failures where the model had good information and then made a bad call, and wrong for the more common class where the context was already corrupted. Step-level verification attaches a check to each step independently, such as validating that tool arguments match the schema, that retrieved documents are topically relevant to the query, or that a claimed fact appears in the retrieved text, and then blames the earliest step whose check fails. This is the most informative approach and the most work, and it is another reason to place component boundaries where a check is possible, as Chapter 1 argued. The verifier that makes a boundary worth having is the same verifier that makes credit assignment tractable.
| CREDIT ASSIGNMENT METHOD | REQUIRES | RIGHT WHEN | WRONG WHEN |
|---|---|---|---|
| Uniform over steps | Outcome label only | Failures are diffuse | One early step poisoned the rest |
| Last step before failure | Outcome label only | Context was good, decision was bad | Context was already corrupted upstream |
| Earliest failing step check | A verifier per step type | Steps have checkable properties | No per-step check exists |
| Counterfactual replay | Resettable environment | Sandboxes, simulators, code execution | Actions touch the outside world |
8.2Four Families of Data
Data for agentic systems arrives in four families, distinguished by who produced it and what question it can answer. Confusing them is a common source of wasted effort, because each family teaches something different and each misleads in a characteristic direction. The families are traces, demonstrations, preferences, and environment outcomes.
Traces are records of the system's own behavior, produced automatically by running it. They are abundant, cheap, and grow with traffic without any human effort. Their content is a description of what the current system does, including its current mistakes, and this is the source of their characteristic distortion: traces are drawn from the distribution the current system induces, not the distribution of tasks users actually have. Requests the system handles badly get abandoned, so they appear less often in later traces. Requests it handles well generate follow-ups and therefore more traces. Over months, the trace corpus drifts toward the system's existing competence, and a team reading only traces will conclude that quality is improving while the population of users who gave up remains entirely invisible. Traces answer the question of what the system does. They cannot answer the question of what it should do.
Demonstrations are records of a competent actor performing the task correctly, whether that actor is a human expert, a stronger model, or the same model given privileged information it will not have at inference time. Demonstrations carry the information traces lack, since they show the target behavior rather than the current behavior. They are expensive, produced at human speed, and they mislead in two specific ways. The first is a form of hindsight leakage: an expert writing an ideal trajectory knows the answer already and therefore writes a short, direct path that omits the exploration a system without that knowledge would need, so a model trained on such demonstrations learns to act as though it already knows things it does not. The second is that demonstrations record the demonstrator's preferences about style and approach, which get learned along with the task and are difficult to separate later.
Preferences are comparative judgments: given two outputs or two trajectories for the same request, which is better. They are substantially cheaper to elicit than demonstrations, because ranking two candidates is faster and more reliable for annotators than authoring one from scratch, and they carry information about relative quality in regions where nobody can articulate an absolute standard. Their characteristic distortion is that they capture what is easy to compare rather than what matters. Annotators comparing two answers reliably notice length, formatting, confidence, and fluency, and reliably fail to notice that one of the two contains a fabricated citation. Preference data therefore tends to encode surface properties unless the comparison protocol forces attention to substance, for example by requiring the annotator to verify each claim against a source before choosing.
Environment outcomes are signals produced by the world rather than by a person: the test suite passed, the API returned 200, the script executed without an exception, the transaction reconciled, the user's follow-up question did not arrive. This family has a property none of the others has, which is that it is not a judgment and cannot be gamed by persuasive presentation. It is the strongest signal available when it exists. Its distortion is coverage: environment outcomes exist for a narrow slice of tasks, and they measure a proxy that may be much weaker than the goal. Code that passes its tests may still be wrong in ways the tests do not cover, and an API returning 200 confirms that a request was well-formed rather than that it was correct. The trap is optimizing hard against an available environment signal because it is available, and thereby maximizing the proxy at the expense of the goal.
| FAMILY | PRODUCED BY | TEACHES | CHARACTERISTIC DISTORTION |
|---|---|---|---|
| Traces | The system, automatically | What the system currently does | Drifts toward existing competence; abandoned users vanish |
| Demonstrations | Expert, stronger model, or privileged run | The target behavior | Hindsight leakage; demonstrator style learned as task |
| Preferences | Annotator comparing candidates | Relative quality where no absolute standard exists | Rewards length, fluency, confidence over substance |
| Environment outcomes | The world | Whether it actually worked | Narrow coverage; proxy may be far weaker than the goal |
SOURCES = {"trace", "demo", "pref", "env"}
def ingest(rec):
assert rec["source"] in SOURCES
if rec["source"] == "demo":
rec["hindsight"] = rec.get("author_saw_answer", True)
if rec["source"] == "env":
rec["proxy"] = rec["signal"] # tests_pass != correct
return rec
# Mixing families into one untagged pool makes every later question
# about provenance unanswerable, including "is this model's own output?"The four families are complements rather than alternatives, and a system that uses only one has a predictable weakness. Traces alone reinforce current behavior. Demonstrations alone teach a target that may not match the distribution the system actually faces. Preferences alone drift toward surface quality. Environment outcomes alone optimize a proxy. The usual working combination is traces for coverage of the real request distribution, a small demonstration set to define the target on the cases that matter most, preferences to rank candidates in regions with no objective signal, and environment outcomes wherever a verifier can be arranged, used as the filter that decides which traces are worth keeping.
Scale differs by an order of magnitude or more across purposes, and the numbers below are working approximations rather than thresholds with theoretical backing. For a first evaluation set intended to catch regressions, fifty to two hundred carefully chosen trajectories are typically enough, because the goal is coverage of distinct failure modes rather than statistical power, and a set that size can be reviewed by a person in an afternoon. For detecting a small quality difference between two system versions with any confidence, several hundred to a few thousand cases are needed, and the exact figure depends on the effect size being chased: distinguishing a five-point difference needs far fewer cases than distinguishing a one-point difference, and teams routinely run underpowered comparisons and interpret noise as progress.
For few-shot prompting, the useful range is small, since somewhere between three and twenty examples typically exhausts the benefit and additional examples consume context that would serve the task better. For supervised fine-tuning of a behavior or format, on the order of one to ten thousand trajectories is a common working range, with quality mattering more than count past the low thousands. For preference-based training methods, tens of thousands of comparisons is the usual regime. For rejection-sampling loops of the kind described in the next lesson, the relevant number is the generation multiplier rather than the corpus size: sampling four to sixteen candidates per task and keeping only those that pass verification produces a filtered set several times smaller than what was generated, so the input task set must be sized accordingly. Chapter 9 addresses how to choose which subset of any of these to label, and this chapter's concern ends at what exists and how it is collected.
| PURPOSE | ROUGH SCALE | WHAT GOVERNS THE NUMBER |
|---|---|---|
| Regression evaluation set | 50-200 trajectories | Coverage of distinct failure modes, not statistical power |
| Detecting a small quality delta | 500-5,000 cases | Effect size being chased; smaller deltas need far more |
| Few-shot prompting | 3-20 examples | Context budget; benefit saturates early |
| Supervised fine-tune of a behavior | 1,000-10,000 trajectories | Quality dominates count past the low thousands |
| Preference-based training | 10,000+ comparisons | Noise in pairwise labels; needs volume to average out |
| Rejection sampling loop | k=4-16 samples per task | Pass rate; yield is tasks × k × pass rate |
8.3The Data Flywheel and the Selection Step
A data flywheel is a closed circuit in which running a system produces data, that data produces improvements, and the improvements produce more usage and therefore more data. The structure is appealing enough that it is often described as if it were automatic, and it is not. Shreya Shankar's account of the flywheel for language-model applications gives it three stages: evaluation, defining success metrics; monitoring, operationalizing those metric implementations; and continual improvement, closing the loop. The ordering carries the argument. Evaluation comes first because a circuit with no notion of success has no direction to turn in.
The evaluation stage is about identifying which metrics matter for a specific use case and then implementing them, either as ordinary code functions where the property is mechanically checkable or as model-based judges where it is not. Shankar's emphasis is that the metrics should be derived from looking at actual outputs rather than from theorizing in advance about what might go wrong, since teams that enumerate hypothetical failure modes before reading their data consistently pick metrics that miss the failures they actually have. She also argues against the reflex toward Likert scales, on the grounds that binary judgments are easier to align between annotators and easier to reason about from a product standpoint. A five-point scale invites disagreement about whether an output is a three or a four while leaving the question of whether it is acceptable unanswered.
Monitoring, the second stage, is about keeping those metric implementations valid as the world moves underneath them. Production data distributions shift, model APIs change behavior beneath a stable version string, and a judge prompt that was well-calibrated when written drifts out of agreement with human judgment over months. Shankar's suggestion is that validators should be reassessed automatically against goals rather than trusted indefinitely, and that model-based validators should be kept dynamic by retrieving relevant production examples into the judge's own prompt so that the judge stays anchored to current data rather than to the examples that were current on the day it was written.
The continual improvement stage closes the loop by combining human analysis of metric score distributions with automated techniques, including active-learning-inspired retrieval of relevant few-shot examples at inference time. The human part is examining where scores cluster and what the low-scoring cases have in common; the automated part is feeding those findings back into the system without a human in each iteration. The circuit turns because each pass produces both a better system and a better understanding of what better means.
| FLYWHEEL STAGE | WHAT IT DOES | COMMON OMISSION |
|---|---|---|
| Evaluation | Derive metrics from real outputs; implement as code or judges | Metrics theorized in advance; Likert where binary would align better |
| Monitoring | Keep validators aligned as data and APIs shift | Judge prompt written once and never recalibrated |
| Continual improvement | Human analysis of score distributions plus automated feedback | Findings never routed back into the system |
| Selection (between collection and improvement) | Decide which traces influence the next version | Skipped entirely; everything is retained and nothing is used |
Between collecting data and improving the system sits a step that most teams omit, and its omission is the usual reason a flywheel does not turn. That step is selection: deciding which of the collected trajectories deserve to influence the next version. Teams that skip it accumulate traces in a warehouse and improve nothing, because the corpus contains successes, failures, duplicates, and near-identical repetitions of the same easy request in proportions that reflect traffic rather than value. A hundred thousand traces of which ninety thousand are the same trivially handled query provide roughly as much improvement signal as a few hundred well-chosen ones, and cost far more to process.
The standard technique for selection when an outcome signal exists is rejection sampling, known in the training literature through the STaR procedure and its descendants: generate multiple candidate trajectories per task, filter by outcome, and train only on the ones that succeeded. STaR, from Zelikman and colleagues, applies this to reasoning by sampling rationales, keeping those that lead to the correct answer, and fine-tuning on the survivors, with a rationalization fallback in which the model is shown the correct answer and asked to produce a rationale for problems it could not solve unaided. The generalization to agents is direct. Sample k trajectories per task, keep those whose environment outcome indicates success, and use the survivors as demonstration data for the next iteration. The mechanism is that the model's own successful behavior is on-policy by construction, so training on it does not require an expert to author trajectories, and the filter supplies the quality that the raw generations lack.
def harvest(tasks, k=8):
kept, stats = [], {"tried": 0, "passed": 0}
for t in tasks:
runs = [rollout(t) for _ in range(k)]
stats["tried"] += k
ok = [r for r in runs if verify(t, r) is True]
stats["passed"] += len(ok)
if ok:
kept.append(min(ok, key=lambda r: r.tokens)) # cheapest success
# Falling pass rate on hard buckets means the set is narrowing.
return kept, stats["passed"] / max(stats["tried"], 1)Three failure modes are worth anticipating. The first is that filtering by outcome keeps trajectories that reached the right answer by luck or by an unnecessarily expensive path, so the retained set encodes detours as though they were method, an instance of the credit assignment problem from Lesson 8.1. Adding a length or cost penalty to the filter, or preferring the shortest successful trajectory per task, mitigates this cheaply. The second is that the surviving set is biased toward tasks the model can already solve, since hard tasks produce no survivors at all, so iterated rejection sampling steadily narrows the training distribution toward what the model already does well. Tracking pass rate per task difficulty bucket and deliberately retaining hard cases counteracts it. The third is that repeated training on self-generated data degrades diversity over generations, which Chapter 9 treats under model collapse; the relevant precaution here is to keep the proportion of human-authored or environment-verified data from falling to zero across iterations.
Selection also matters when no automatic outcome signal exists. In that regime the options are to select by disagreement, keeping cases where two system versions or two judges differ, since those carry the most information per label; to select by uncertainty, keeping cases where the system's own confidence or its self-consistency across samples is lowest; or to select by novelty, keeping cases unlike anything already in the corpus. Chapter 9 develops the criteria for choosing among these and the machinery for measuring agreement once labels are collected. The point belonging to this chapter is that some selection rule must exist and be written down, because the default rule, which is to keep everything and look at whatever surfaces, is not a rule and does not turn the circuit.
| SELECTION RULE | NEEDS | KEEPS | WATCH FOR |
|---|---|---|---|
| Rejection sampling by outcome | An automatic verifier | Trajectories that succeeded | Lucky detours; distribution narrowing to easy tasks |
| Shortest successful path | Verifier plus cost per trajectory | Efficient successes | Over-penalizing legitimate exploration |
| Disagreement between versions | Two system versions or two judges | Cases that discriminate | Disagreement concentrated in genuinely ambiguous cases |
| Low self-consistency | k samples per input | Cases the system is unsure about | Uncertainty that reflects bad prompting, not hard tasks |
| Novelty against the corpus | An embedding index | Requests unlike anything stored | Novel and irrelevant look the same to the index |
8.4Human-Agent Interaction Data, Privacy, and Retention
When an agent operates alongside a person, the interaction produces a class of data unavailable from any offline process. The person sees the agent's proposal in the context of their own goal, which the agent only partially knows, and their response carries information about that goal. The most valuable form of this is the correction: the agent produced a draft, a plan, or an action, and the person changed it before accepting. A correction is nearly a paired demonstration, since it supplies both what the system produced and what a competent actor wanted instead, on exactly the input distribution the system faces. Nothing else in the four families combines target behavior with real distribution this directly, and corrections are also naturally rare, which is what makes them worth building specific infrastructure to capture.
Capturing corrections well requires recording the diff rather than only the final artifact. The final artifact says what the person wanted; the diff says what the system got wrong, which is the trainable and diagnosable part. A record that stores only the accepted version forces a later reconstruction of the delta and loses the ordering and granularity of the edits. Useful correction records include the original output, the accepted output, the structured diff, the trajectory identifier linking back to how the original was produced, and whatever the interface can capture about which part of the output the person's attention went to.
Acceptance without edits is a much weaker signal than it appears, and treating it as ground truth is a common and expensive mistake. A person accepts an output for many reasons unrelated to its correctness: the output was long and checking it thoroughly was expensive, the person lacked the domain knowledge to spot the error, the interface made acceptance one click and rejection a form, the person was under time pressure, or the output was confidently phrased and matched their expectation. Acceptance rate therefore measures a blend of quality, verification cost, interface design, and user diligence, and it rises when outputs get more persuasive as readily as when they get more correct. Some of the largest observed acceptance rates in deployed systems come from interfaces where reviewing carefully is inconvenient, which is the reverse of the intended relationship. Systems that optimize directly for acceptance rate are optimizing for whichever of those factors is cheapest to move.
| SIGNAL | STRENGTH | WHY IT MISLEADS |
|---|---|---|
| Explicit correction (diff captured) | Highest | Rare; biased toward users who bother to edit |
| Rejection with a stated reason | High | Reasons are post-hoc rationalizations of a felt problem |
| Rejection without a reason | Medium | Cause is unrecoverable without the trajectory |
| Delayed outcome (task completed, no rework) | Medium-high | Noisy per instance; needs volume and attribution |
| Acceptance without edits | Low | Confounded by verification cost, UI friction, time pressure |
| Thumbs-up rating | Low | Rated by a self-selecting minority; measures satisfaction |
Two remedies are practical. The first is to instrument the cost of verification alongside the acceptance decision, recording how long the output was displayed before acceptance, whether it was scrolled or expanded, and whether the person opened any of the cited sources. An acceptance after four hundred milliseconds on a two-thousand-word document is not evidence of quality. The second is to arrange a delayed outcome signal that does not depend on the moment of acceptance, such as whether the accepted artifact was later edited, whether the task it belonged to was completed, or whether the person returned with the same request. Delayed signals are noisier per instance and far less susceptible to the pressures that distort immediate acceptance.
Production traces contain user data, and the trajectory framing of this chapter makes the exposure larger than conventional application logging does, which deserves explicit treatment because it is usually handled late. A trajectory stores the original request, which may contain anything a user typed; the arguments to every tool call, which frequently contain identifiers, account numbers, addresses, and query strings assembled from user input; the raw observations returned by tools, which for a database or document tool may contain entire records belonging to people who are not the user; and the model's intermediate reasoning, which may restate sensitive content in paraphrase and therefore evade pattern-based redaction. The observation field is the largest exposure and the one most often overlooked, since a single retrieval step can pull hundreds of records into a log that was scoped as debugging data.
| TRACE FIELD | PII EXPOSURE | HANDLING |
|---|---|---|
| User request text | High, unstructured | Detector redaction at write time; short retention on raw |
| Tool arguments | High, often structured identifiers | Field-level allowlist; tokenize identifiers |
| Raw observations | Highest volume; may include third-party records | Store by reference, shortest clock, tightest access |
| Model intermediate reasoning | Paraphrases sensitive content | Detectors miss it; treat at the same tier as the request |
| Step structure, timings, token counts | Low | Retain long-term; this is what metrics need |
Handling this requires decisions at four points. At collection, redaction should run before the trace is written rather than as a later cleanup pass, because a trace that reaches storage unredacted has already been copied into backups and replicas. Detector-based redaction catches structured identifiers such as card numbers, national identifiers, emails, and phone numbers with reasonable reliability, and misses free-text disclosures, so it should be paired with a policy that limits which fields are stored in full at all. At storage, traces should be separated by sensitivity so that the high-volume, low-sensitivity portion, which is typically step structure, timings, and token counts, can be retained long-term while raw payloads live under a shorter clock and tighter access control. At access, trace viewing is a data access and belongs behind the same controls and audit logging as querying the production database directly, which is a step teams often skip because tracing tools are classified as engineering infrastructure. At retention, every field needs an expiry, and deletion requests need to reach traces, which requires that traces carry the subject identifiers needed to find them, a requirement in tension with redacting those same identifiers and usually resolved with a reversible token held separately.
Sampling rates follow from these costs rather than from a general preference for completeness. Recording full trajectories with raw observations for every production request is expensive in storage and in exposure, and it is rarely necessary. A workable default is to record the structural skeleton of every trajectory, meaning the step sequence, tool names, token counts, timings, and stop reason, and to record full payloads for a sampled fraction of ordinary traffic plus every trajectory that meets a trigger condition. Useful triggers include any run that ended in an error or hit a cap, any run whose cost or step count exceeded a percentile threshold, any run the user corrected or rejected, and any run touching a feature under active development. This keeps the aggregate statistics complete while confining the expensive, sensitive detail to the runs that need it. A sampling rate between one and ten percent for full payloads is a common starting point, adjusted by traffic volume and by how often investigations turn out to need a trace that was not captured.
def should_store_payloads(tr):
return (tr.stop != "answered" # errors and caps
or tr.user_edited # corrections
or tr.cost > COST_P95
or tr.feature in CANARY_FEATURES
or random.random() < 0.02) # 2% of normal traffic
def write(tr):
put(skeleton(tr), ttl=DAYS_400) # always, low sensitivity
if should_store_payloads(tr):
put(redact(payloads(tr)), ttl=DAYS_30) # redact before writeRetention should be set by the question each field answers rather than by a single global policy. Aggregate metrics need long histories to show trends and can be computed and stored in aggregate form, so the underlying detail need not persist for the metric to survive. Debugging needs recent full detail, and the useful window is measured in weeks rather than years, since a trace from eight months ago describes a system configuration that no longer exists. Training corpora need to be curated deliberately and moved out of the raw trace store into a governed dataset with its own consent basis and documentation, which is where Chapter 9's treatment of datasheets and data cards applies. A raw trace store treated as a permanent training corpus accumulates unbounded liability while providing steadily less usable data as the system it describes drifts away from the one running today.
Design an agent data card
For one dataset you have collected, document provenance, collection policy, filtering criteria, known biases, and the failure modes it cannot detect. Then hand the card to someone who was not involved and ask what they would still be unable to determine.