Overview of Agent Pipeline Post-Analysis Scripts
mainThe Agent pipeline post-analysis scripts are used to process and analyze data after running the dj-process step. These scripts allow for verifying exports, computing statistical thresholds, analyzing cohorts, and generating HTML reports for bad-case analysis.
Key Scripts:
generate_bad_case_report.py: Generates self-service HTML reports including tiering, signal attribution tables, and cohort views.bad_case_signal_support.py: Provides static data for signal attribution (mapping signal codes to upstream metadata/stats).dj_export_row.py: Parses__dj__meta__and__dj__stats__and merges them with corresponding*_stats.jsonlfiles.verify_bad_case_export.py: Verifies ifagent_bad_case_tierandagent_bad_case_signalsfields are present in the export.compute_percentile_thresholds.py: Aggregates metrics (tokens, latency, perplexity) byagent_request_modeland computes percentiles or generates calibration JSON.analyze_bad_case_cohorts.py: Summarizes data by model, prompt template (pt), or tier.slice_export_by_tier.py: Exports subsets of data based onmeta.agent_bad_case_tier.