Agent Execution Trajectory Normalization and Deduplication Analysis
Clean, canonicalize, and deduplicate noisy agent trajectory datasets to prepare clean training and evaluation benchmarks.
Use this template when preparing autonomous agent execution logs for fine-tuning, regression testing, or benchmark evaluations. It provides a structured methodology to clean broken trajectory steps, deduplicate identical agent pathways, and standardize tool invocation formats.
Role: Senior Autonomous Systems Data Analyst specializing in trajectory dataset hygiene and offline evaluation curation.
Context
- Dataset source: {{trajectory_dataset_source}}
- Canonical trajectory schema: {{canonical_schema_format}}
- Observed anomaly types: {{anomaly_detection_rules}}
- Noise tolerance ceiling: {{noise_tolerance_threshold}}
- Primary evaluation target: {{evaluation_pipeline_target}}
Task
Generate a detailed dataset cleaning and normalization analysis for trajectory traces from {{trajectory_dataset_source}}, transforming raw, inconsistent multi-step agent actions into standard formats compliant with {{canonical_schema_format}} for {{evaluation_pipeline_target}}.
Method
- Ingest raw trajectory records from {{trajectory_dataset_source}} and map all recorded steps to standard state-action-observation triples.
- Execute anomaly scans using {{anomaly_detection_rules}} to identify truncated action sequences and phantom tool executions.
- Detect and group semantically duplicate execution trajectories resulting from loop retries or deterministic replay runs.
- Measure the ratio of corrupted trajectories against {{noise_tolerance_threshold}} to evaluate dataset viability.
- Standardize disparate tool input and output structures into the unified structure mandated by {{canonical_schema_format}}.
- Normalize status codes, latency timestamps, and execution status flags across all tool invocations.
- Construct an outlier handling policy that isolates non-deterministic agent spirals without dropping rare valid edge cases.
- Formulate a final data quality scorecard ready for ingestion into {{evaluation_pipeline_target}}.
Constraints
- MUST maintain chronological step integrity when cleaning multi-turn trajectory sequences.
- MUST NOT discard trajectory failures if they contain valid negative-example learning signals.
- Schema normalization rules must handle missing intermediate observation values gracefully.
- All cleaning operations must be reproducible via scriptable data pipelines.
Output format
1. Dataset Health Baseline
- Trajectory count, step distribution, and anomaly prevalence versus {{noise_tolerance_threshold}}.
2. Trajectory Anomaly Taxonomy
- Categorized listing of corruptions (e.g., hanging tool calls, malformed state returns, duplicate sub-graphs).
3. Normalization & Canonicalization Rules
- Step-by-step transformation specifications to convert raw logs to {{canonical_schema_format}}.
4. Benchmark Ingestion Readiness Review
- Data filtering checklist and quality certification for {{evaluation_pipeline_target}}.
Self-review
- Verify that every step in the method addresses trajectory integrity and sequence ordering.
- Confirm that the proposed schema transformations align precisely with {{canonical_schema_format}}.
- Check that negative-example preservation is explicitly incorporated into the deduplication logic.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.