he-yufeng

TrajBias — AI skill for Claude Code

AI community

TrajBias: Structural Biases in LLM-as-Judge Evaluation of Agent Trajectories.

How to install TrajBias

This entry records only its repository, not the path inside it, so there is no exact command to give. Open he-yufeng/TrajBias and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What TrajBias does

TrajBias: Structural Biases in LLM-as-Judge Evaluation of Agent Trajectories.

Alternatives in AI

  • Opencodex — Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama… 12.3k ★
  • Firecrawl MCP Server — 🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM c 6.1k ★
  • Inference Serving — ai-research-skills vLLM, SGLang, TensorRT-LLM, llama.cpp 5.4k ★

README

TrajBias: Structural Biases in LLM-as-Judge Evaluation of Agent Trajectories

This repository contains the code and data for the paper:

**TrajBias: Structural Biases in LLM-as-Judge Evaluation of Agent Trajectories** Yufeng He, The University of Hong Kong

Key Findings

Through controlled perturbation experiments with 7 judge models from 7 families on coding agent trajectories, we discover:

  1. Error Recovery Penalty (strongest): Trajectories with error recovery are systematically penalized (Cliff's delta up to 0.85, all p<0.001)
  2. Recency Bias: Later errors receive harsher penalties than identical errors earlier
  3. Bidirectional Outcome Bias: Outcome information contaminates process judgments in both directions, but opposing effects cancel in aggregate -- a methodological pitfall
  4. Absent Length Bias: Trajectory length does not influence scores, contradicting text-domain verbosity bias
  5. Multidimensional Bias Robustness: No single judge is universally least biased

Dataset

Available on HuggingFace: [yufenghe/trajbias-benchmark](https://huggingface.co/datasets/yufenghe/trajbias-benchmark)

Contains:

  • 2,400 controlled perturbation probe pairs (5 bias types)
  • 20,000+ evaluation scores from 7 judge models
  • Complete statistical analysis results
  • Croissant metadata

Repository Structure

scripts/
  bias_probes.py              # Generate perturbation probe pairs
  run_w3_full_eval.py         # Run LLM judge evaluations
  statistical_analysis_v2.py  # Statistical analysis (Cliff's delta, BH FDR)
  generate_figures.py         # Generate paper figures
  debiasing_experiments.py    # Debiasing strategy experiments
  prepare_hf_dataset.py       # Prepare HuggingFace dataset

Requirements

pip install numpy scipy matplotlib

Judge Models Tested

Judge Family
Claude Sonnet 4.5 Anthropic
GPT-5.2 OpenAI
Gemini 3 Pro Google
DeepSeek V3.2 DeepSeek
Qwen3-235B Ali