Problem
Yandex ran an in-house generator of Pull Request (PR) descriptions on a 7B model, used by dozens of teams on thousands of PRs per week. New open-source code models appeared in 2024, and NDA code allows only locally hosted ones. The team had to pick a prompt and a model and prove the choice is better, without human assessors. An A/B test on developer edits could not settle it.
Example from the article: for 20% of PRs the team cut half of the diff and half of the commit messages; the judge score of descriptions fell from 93% to 75%, yet developers edited descriptions equally often in both groups.
Solution in brief
Take quality criteria from a developer survey, build a validation set from public PRs, and let an LLM judge compare outputs pairwise. Tune the prompt against the old prompt, then rank candidate models on a held-out sample. Validate the judge with identical pairs, a second judge model and a deliberate quality drop.
Questions this case answers
- How to compare prompts and models for a text-generation feature objectively when manual labeling is too expensive and users do not notice quality differences
- How to validate an LLM judge by checking it against degraded outputs, identical pairs and a second judge model
- How to choose a better prompt and a better open-source model for an LLM text-generation feature without manual labeling?
- How to build a validation set for a code-related generation task from public repositories?
Tools and methods
- LLM as a judge, pairwise — Claude Sonnet 3.5 picks the better of two descriptions
- Developer survey — 5 PRs, 3 prompt variants each
- OpenPR dataset — 116 thousand PRs from 50+ open-source repositories
- Open-source code LLMs — DeepSeek-Coder-V2-Lite, Qwen2.5-Coder 14B and 32B, Codestral-22B
- GGUF quantization (Q4_M) — cheaper serving of Qwen2.5-Coder-32B
Google or a one-time email code. No password.
