Compare Friction Outputs
by davidjiyangcai
Compare friction pipeline outputs across different runs, thinking levels, or seeds. Use when comparing visa research results, checking variance across thinking levels (minimal/low/medium), analyzing fee discrepancies, or reviewing route selection consistency.
Skill Details
Repository Files
1 file in this skill directory
name: compare-friction-outputs description: Compare friction pipeline outputs across different runs, thinking levels, or seeds. Use when comparing visa research results, checking variance across thinking levels (minimal/low/medium), analyzing fee discrepancies, or reviewing route selection consistency. allowed-tools: Read, Glob, Grep, Bash
Compare Friction Pipeline Outputs
Compare outputs from the orig_dest_occ_friction pipeline across different runs to analyze variance and consistency.
When to Use
- Comparing results across thinking levels (minimal, low, medium)
- Checking if route selections are consistent
- Investigating field value variance (fees, salaries, processing days)
- Verifying synthesis decisions
Key File Locations
src/orig_dest_occ_friction/
├── artifacts_v8_minimal/
│ └── [triple]/
│ ├── output.json # FINAL extracted values (use this!)
│ ├── panel.csv # Yearly panel expansion
│ └── workspace/
│ ├── research.md # Full research with worker synthesis
│ ├── todos.json # Field completion status
│ └── year_routes.json # Route selection
├── artifacts_v8_low/
└── artifacts_v8_medium/
Comparison Workflow
1. Find artifact directories
ls -d src/orig_dest_occ_friction/artifacts_*
2. Find common triples
ls src/orig_dest_occ_friction/artifacts_v8_minimal/
3. Compare route selections
For each triple, extract first route from output.json → year_routes.
4. Compare field values
Key fields to compare:
application_fee_applicant- Total mandatory feessalary_min- Minimum salary thresholdrepresentative_days- Processing timepr_years_required- Years to permanent residencyjob_loss_grace_period_days- Grace period after job loss
5. Use the comparison script
uv run python scripts/compare_friction_outputs.py artifacts_v8_minimal artifacts_v8_low artifacts_v8_medium
Understanding research.md Structure
The workspace/research.md file has multiple sections:
- Worker Reports (top) - 3 parallel workers with potentially different findings
- Step 1: Decisions - Synthesis rationale explaining which worker was chosen
- Step 2: Search Queries/Results - Verification searches
- Step 3: Final Synthesis - THE ACTUAL OUTPUT VALUES (matches output.json)
IMPORTANT: Always compare using output.json or "Step 3: Final Synthesis", NOT the individual worker reports at the top of research.md.
Investigating Variance
When values differ across runs:
- Read the full
research.mdfor each run - Check "Step 1: Decisions" for the rationale
- Look for which worker was selected and why
- Check if the variance is due to:
- Different fee components included
- Historical data interpretation differences
- Source availability differences
Output Format
=== ROUTE SELECTIONS ===
Triple minimal low medium
australia_china_2211 Subclass 457 Subclass 457 Subclass 457
=== FIELD COMPARISON ===
australia_china_2211:
⚠️ application_fee_applicant: (⚠️ = values differ)
minimal: 765
low: 265
medium: 615
salary_min: (no marker = consistent)
minimal: 47480
low: 47480
medium: 47480
Related Skills
Attack Tree Construction
Build comprehensive attack trees to visualize threat paths. Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.
Grafana Dashboards
Create and manage production Grafana dashboards for real-time visualization of system and application metrics. Use when building monitoring dashboards, visualizing metrics, or creating operational observability interfaces.
Matplotlib
Foundational plotting library. Create line plots, scatter, bar, histograms, heatmaps, 3D, subplots, export PNG/PDF/SVG, for scientific visualization and publication figures.
Scientific Visualization
Create publication figures with matplotlib/seaborn/plotly. Multi-panel layouts, error bars, significance markers, colorblind-safe, export PDF/EPS/TIFF, for journal-ready scientific plots.
Seaborn
Statistical visualization. Scatter, box, violin, heatmaps, pair plots, regression, correlation matrices, KDE, faceted plots, for exploratory analysis and publication figures.
Shap
Model interpretability and explainability using SHAP (SHapley Additive exPlanations). Use this skill when explaining machine learning model predictions, computing feature importance, generating SHAP plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing model bias or fairness, comparing models, or implementing explainable AI. Works with tree-based models (XGBoost, LightGBM, Random Forest), deep learning (TensorFlow, PyTorch), linear models, and any black-box model
Pydeseq2
Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.
Query Writing
For writing and executing SQL queries - from simple single-table queries to complex multi-table JOINs and aggregations
Pydeseq2
Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.
Scientific Visualization
Meta-skill for publication-ready figures. Use when creating journal submission figures requiring multi-panel layouts, significance annotations, error bars, colorblind-safe palettes, and specific journal formatting (Nature, Science, Cell). Orchestrates matplotlib/seaborn/plotly with publication styles. For quick exploration use seaborn or plotly directly.
