Comparing Developer and LLM Biases in Code Evaluation
Organizations: Carnegie Mellon University
Abstract
As LLMs are increasingly used as judges in code applications, they should be evaluated in realistic interactive settings that capture partial context and ambiguous intent. We present TRACE (Tool for Rubric Analysis in Code Evaluation), a framework that evaluates LLM judges' ability to predict human preferences and automatically extracts rubric items to reveal systematic biases in how humans and models weigh each item. Across three modalities -- chat-based programming, IDE autocompletion, and instructed code editing -- we use TRACE to measure how well LLM judges align with developer preferences. Among 13 different models, the best judges underperform human annotators by 12-23%. TRACE identifies 35 significant sources of misalignment between humans and judges across interaction modalities, the majority of which correspond to existing software engineering code quality criteria. For example, in chat-based coding, judges are biased towards longer code explanations while humans prefer shorter ones. We find significant misalignment on the majority of existing code quality dimensions, showing alignment gaps between LLM judges and human preference in realistic coding applications.
Figures & tables
| Code Completion | Chat | Code Edit | |
| # of Natural Languages | 23 | 14 | 20 |
| # of Programming Languages | 39 | 57 | 43 |
| Context Length - p50 | 2,233 | 1,013 | 3,490 |
| Context Length - p95 | 13,984 | 12,509 | 28,189 |
| Output Length - p50 | 108 | 5,491 | 531 |
| Output Length - p95 | 613 | 20,156 | 3,053 |
| Code Completion | Instructed Code Edits | Chat-based Coding | ||||
| Acc | Acc | Acc | ||||
| Fine-tuned Judge | ||||||
| Atla Selene 1 Mini (Llama-3.1-8B) | 59.01 | 37.67 | 51.8 | 31.6 | 63.76 | 19.00 |
| Atla Selene 1 (Llama-3.3-70B) | 61.99 | 46.00 | 54.35 | 30.4 | 67.40 | 24.40 |
| Prometheus 2 (7B) | 53.62 | 29.60 | 52.21 | 26.0 | 58.80 | 25.40 |
| Skywork Critic (Llama-3.1-70B) | 63.28 | 48.6 | 56.14 | 32.00 | 61.87 | 51.6 |
| Prompt (paraphrased) | Implement the stockSpan method. Given an array of daily stock prices, compute, for each day, the number of consecutive previous days whose price is less than or equal to the current price. | |
| Model 1 | Model 2 | |
| Completion | ⬇ stockSpan ( stocks ) { stack = new Stack <>(); for ( int i = 0; i < stocks . length ; i ++) { ... } } | ⬇ stockSpan ( stocks ) { stack = new Stack <>({0}); out [0] = 1; for ( int i = 1; i < stocks . length ; i ++) { ... } } |
| Explicitness and Clarity | Omits base case initialization, making initial logic implicit. | |
Bias in LLM-as-a-Judge
Bias in large language model (LLM)-as-a-judge evaluation studies systematic distortions in automated assessments of model outputs.
See all 116 papers