Skip to content

feat: M71 — Output Length Bias Detection - #152

Merged
hlin99 merged 1 commit into
mainfrom
feat/m71-length-bias
Apr 5, 2026
Merged

hlin99 merged 1 commit into
mainfrom
feat/m71-length-bias

Conversation

@hlin99

@hlin99 hlin99 commented Apr 5, 2026

Copy link
Copy Markdown
Member

Summary

Detect systematic output length differences between baseline and target endpoints using paired t-test.

Changes

  • New length_bias.py module: SampleLength, LengthBiasResult, analyze_length_bias(), format_length_bias()
  • Paired t-test with normal approximation for statistical significance
  • Classification: shorter_bias, longer_bias, no_bias
  • CLI subcommand: xpyd-acc length-bias --report <path>
  • Flags: --alpha, --json
  • Exit 1 if significant bias detected (CI-friendly)
  • ROADMAP.md updated with M71
  • 28 tests

Closes #151

- length_bias.py module: paired t-test for systematic length differences
- SampleLength and LengthBiasResult dataclasses with serialization
- CLI: xpyd-acc length-bias --report <path> [--alpha] [--json]
- Exit 1 if significant bias detected (CI-friendly)
- Rich terminal output with distribution breakdown
- 28 tests

Closes #151
@hlin99
hlin99 merged commit 45935cc into main Apr 5, 2026
4 checks passed
@hlin99
hlin99 deleted the feat/m71-length-bias branch April 5, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: M71 — Output Length Bias Detection

1 participant