When could I switch off a full review?
I send a whole change for review. The filter scores one block at a time. If a change contains ten blocks and nine qualify to skip, I still pay for the full review. Only when all ten qualify could I omit that call. In the live trial I kept the full reviewer on for every change.
My review history gave me a cheap way to test the idea. I knew which comments an author had acted on. A block with no accepted comment was harder to interpret. A reviewer might have found nothing, missed a problem, or left a comment the author declined.
In ai-13 I counted 924 of 2,993 review threads whose findings an author had acted on. For this study I checked who wrote those records. Agents wrote 2,992 and a person wrote one. Those records could tell me which blocks had drawn a response. To decide whether to let a change bypass review, I also needed to know what the filter would miss.
The test training had to pass. Beat the same model, given two examples.
I had 1,097 pairs from 233 changes. Each pair contained a block of code and an accepted review comment about it. Only one comment was written by a person. I used 988 pairs for training and 109 for validation. On one machine, I fine-tuned two Qwen3 models with LoRA, a method that updates a small set of weights. The 4B run took 13 minutes and the 8B run took 20.
In training, the model saw a block and learned to write the comment. Every example had a comment to write. In the screening test I asked the model to decide whether a reviewer should flag the block. Each trained model had to answer PITFALL or CLEAN without examples. I gave its untrained counterpart two examples in the prompt, one of each answer. This tested whether learning to write comments carried over to screening. Training a classifier directly on both kinds of block would be a separate experiment.
I held out entire changes for the test and sampled 158 blocks with an accepted comment and 316 without. That one-to-two mix was a sampling choice. The share of flags that match accepted comments can change when the mix changes. Alongside the four small-model runs, I scored a paid model, Claude Haiku 4.5, and a list of keyword rules on the same 474 blocks.
Before the July run I wrote down two criteria. To justify maintaining a trained model, it had to beat its own two-example baseline. To qualify as a filter, at a setting that caught at least half the blocks with an accepted comment, at least three quarters of the blocks it flagged had to have an accepted comment.
Neither trained model beat its two-example baseline.
At 4B, training scored 0.47 against 0.53 for the prompt. At 8B the scores were 0.55 and 0.58. The ranking score measures how often a block with an accepted comment ranks above one without. Chance scores 0.5. Precision is the share of flagged blocks with an accepted comment at the setting that catches at least half of them.
| candidate | ranking score | precision | cost per block |
|---|---|---|---|
| paid model Claude Haiku 4.5 | 0.70 ± 0.05 | 0.496 | $0.002 |
| keyword rules free | 0.59 ± 0.05 | 0.394 | 0 |
| 8B, prompted with two examples | 0.58 ± 0.05 | 0.408 | 0 |
| 8B, trained | 0.55 ± 0.05 | 0.385 | 0 |
| 4B, prompted with two examples | 0.53 ± 0.05 | 0.370 | 0 |
| 4B, trained | 0.47 ± 0.05 | 0.368 | 0 |
The 4B trained model flagged about nine blocks in ten. Even the paid model reached only 0.496 precision against my target of 0.75. I stopped spending on this training recipe. The intervals in the table describe individual scores. Establishing how precisely I had measured the gap within each pair would require comparing their predictions block by block.
The records were hard to predict from the code. For every model I tried.
A weak result invites the expensive next step: a bigger model, longer training, a better method. Before spending on any of that, I asked a cheaper question. How well can anything predict these records from what my filter would see, one block of changed code? I showed a sample of 120 blocks to three large models from different vendors, Claude Opus 4.8, DeepSeek v3.2 and Qwen3 235B, without my records, and took their majority vote.
The three were unanimous on only 38 of the 119 blocks that got a clear verdict; the rest split two to one. Their majority agreed with my records 60.5 percent of the time, less than the 67 percent you would get by calling every block clean. Of the blocks my records marked as needing a comment, the panel thought half did not; of the blocks my records marked clean, the panel thought a third needed one. Nothing I tried, trained or prompted, cheap or paid, came close to my target: the best, the paid model, reached 0.496 precision on all 474 blocks, against 0.75.
Two readings fit, and they are not exclusive. The records may be noisy: whether a comment was acted on depends on which agent wrote it and on the author that day. Or a block alone may not carry what decided the record: the rest of the change, the discussion, the agent's instructions. Either way, a filter that sees only the block is working from a weak signal, and a bigger or better-trained model would be starting from the same one. A free keyword list gives a hint. Its ranking score was 0.62 against my records on the sample and fell to 0.55 against the panel's votes, while most other candidates rose when scored against the panel. Keyword rules resemble what the review agents themselves look for, so against the agents' own records they were partly grading their own work.
The panel is three AI models judging records written by other AI agents, and one of them shares a vendor with the paid candidate; the methods notes give the details. No human graded the sample. I can measure how well each model predicted my records. Whether a reviewer should have flagged a given block is a different question. In October I tested how much that answer depended on which models I asked.
Test how predictable your records are before you set a target.
It cost one sample of 120 blocks and three model calls each. Run first, it would have shown that none of the models I could reach came near my target from a single block of code. That was reason enough to look at the records and at the missing context before funding any training.
Could a rewritten prompt spare the full reviewer?
On 17 October I scored changes as they arrived and kept the full reviewer running alongside the filter. The filter would have skipped 105 of 315 documentation blocks and zero of 78 code blocks. Across 20 runs on 11 distinct changes, every run still had work for the full reviewer. That was the rollout decision for this cohort. I kept full review on.
The offline results explain why I took the prompt into that trial. In July I used GEPA, a tool that rewrites a model’s instructions and examples. A large model proposed edits and a small model tried them on 120 practice blocks kept apart from the evaluation. My first scoring rule penalized a false alarm more than a missed finding. The tool learned to flag almost nothing. When I gave it one point for each correct answer, precision rose to 0.464, close to the paid model’s 0.496 in that run. Median time per block was 0.26 seconds against 2.35. About 0.04 of the gain came from vocabulary borrowed from my own pitfall notes.
After the July candidates missed the original precision target, I changed the question. How many blocks could I omit for each finding missed? I required at least five skips per miss, at most one finding in ten missed and no high or critical finding skipped. I applied the rule against both my records and the panel’s votes. The rewritten prompt qualified, as did a hand-written prompt using the same vocabulary. The keyword rules and the paid model had no qualifying setting.
I chose the July cutoff on the same 474 blocks I used to score it. It would have skipped 22 blocks, including one of the 158 with an accepted comment. Pricing those 22 at the paid model’s per-block rate gave me a reason to test on live changes. On 50 fresh blocks the filter would have skipped nine, seven of them documentation, and missed none of seven recorded findings.
In October, four models graded the original 120-block sample blind. They flagged six blocks, called 106 clean and left eight unresolved. Six positives gave me too little evidence to judge a 10 percent miss limit. Before two of those models graded the full 474, I fixed the scoring rule. They resolved 449, including 142 of the 158 historical positives. They flagged 27 blocks, 25 of which had an accepted comment. Their agreement with my records was 73.5 percent, against 68.4 percent for calling every resolved block clean.
The two graders called all 22 proposed skips clean. None of the 25 unresolved blocks fell among them. The filter missed zero of the 27 panel positives, for a one-sided 95 percent Wilson upper bound of 9.11 percent under those model labels. One miss would have put it over my limit. No human graded the sample. The model grades answered my question about missed blocks. The live runs answered how many review calls I could spare.
Methods notes, for readers who want the mechanics
How I trained, scored and graded the models.
Data. Training pairs were accepted review comments with the block of code they were written against, 1,097 pairs across 233 changes, one written by a person. Evaluation used 474 blocks from changes held out as whole changes, so no change contributed to both, at one block with an accepted comment to two without.
Training. Qwen3 at 4B and 8B parameters, 4-bit, LoRA on the top 8 layers, 300 steps of 2 examples at a learning rate of 0.00001, less than one pass over the 988 training pairs; 13 and 20 minutes on one 64 GB Apple-silicon machine. The loss covered the whole conversation, prompt included, so its fall shows the models learned to reproduce comment text, not that they learned to classify.
Scoring. Small models were scored by the probability of the first word of a PITFALL or CLEAN answer. The trained models were asked without examples; the prompted models got two, one of each answer. The paid model returned its findings with a confidence, which gives it few distinct settings, so its ranking score is if anything understated. Ranking ranges are Hanley and McNeil 95 percent intervals, 0.052 to 0.055 wide on each side; they describe each candidate separately. The paid model's median wait was 3.5 seconds in the 6 July run and 2.35 seconds in the 20 July run that tested the rewritten prompt; each comparison here stays inside one run.
The July panel. 120 blocks were sampled; one ended in a tie and was dropped. The panel's instructions were revised once: the first version asked for a stricter standard, a real pitfall rather than any comment worth acting on, and called 85 of 86 blocks clean, which answered a different question from the one my records ask. The final instructions ask whether a careful reviewer would leave a comment the author acts on. Claude Opus 4.8 sits on the panel, shares a vendor with the paid candidate, and also proposed the edits in the prompt-rewriting run. Chance-corrected agreement between the panel's majority and my records (Cohen's kappa) was 0.14.
The October panels. Each model saw one block at a time and the same question about an actionable comment. For the 474-block grading I used GPT-6 Astra and Claude Fable 5.1, reusing their blind votes on the 120 overlapping blocks. They had one round to reconsider disagreements. The 25 blocks still unresolved were excluded from the miss-rate calculation. None fell among the 22 skips at the shadow cutoff. The upper limit is a one-sided 95 percent Wilson bound. All these labels came from models.
What I’d ask to see before funding a rollout.
I would keep full review in place. The training comparison gave me no reason to maintain these model weights, and the shadow trial identified no review call I could remove. I would fund another pilot if it could answer three questions.
- What should count as a miss? I’d ask experienced reviewers to grade a blinded sample from the team’s own changes, with the surrounding code available. I’d compare their judgments with the accepted comments and inspect disagreements, especially where a severe finding might escape review.
- Does training help with the decision I need? I’d train the next model to classify blocks, including clean examples, then compare it with the same base model under the same prompt and scoring conditions. I’d choose the cutoff and agree on an acceptable miss rate before opening the test set.
- How much review work would the team actually save? On fresh changes in their usual mix, I’d keep the full reviewer on and count whole changes eligible to bypass it. I’d check the findings on those changes and compare the cost of the calls I could eliminate with the cost of screening every block. Those are the numbers I’d take to a rollout decision.
An independent applied-AI engineering note by Arseny Gorokh. Not an official EPAM publication. All numbers come from the author's own pipeline records: the training comparison ran on 6 July 2026, the first panel check and the prompt rewrite later in July, and the shadow trial and additional model grading on 17 and 18 October 2026. Internal system names, hosts and identifiers are withheld, and the review records stay private. One pipeline, one task, one operator: treat the magnitudes as specific to these records and the checks as the claim.
References
- M. J. J. Bucher and M. Martini, "Fine-Tuned 'Small' LLMs (Still) Significantly Outperform Zero-Shot Generative AI Models in Text Classification", arXiv:2406.08660, June 2024. The well-supported case for small trained models; their comparison is against large models asked cold, mine against the same small model given examples.
- I. Begolli, M. Aksoy, and D. Neider, "Fine-Tuning Multilingual Language Models for Code Review: An Empirical Study on Industrial C# Projects", arXiv:2507.19271, July 2025. Training on a company's own review data improved review output, with human reviewers still stronger on changes that need context.
- E. J. Hu, Y. Shen, P. Wallis, Z. Allen-Zhu, Y. Li, S. Wang, L. Wang, and W. Chen, "LoRA: Low-Rank Adaptation of Large Language Models", arXiv:2106.09685, 2021. The training method used here.
- L. A. Agrawal, S. Tan, D. Soylu, N. Ziems, R. Khare, K. Opsahl-Ong, A. Singhvi, H. Shandilya, M. J. Ryan, M. Jiang, C. Potts, K. Sen, A. G. Dimakis, I. Stoica, D. Klein, M. Zaharia, and O. Khattab, "GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning", arXiv:2507.19457; ICLR 2026. The prompt-rewriting tool used in section v.
- J. A. Hanley and B. J. McNeil, "The Meaning and Use of the Area under a Receiver Operating Characteristic (ROC) Curve", Radiology 143(1), 1982. The method for the ranking-score ranges in Table 1.
- Earlier notes on this review pipeline. I counted which review threads authors acted on in ai-13. I tracked how the reviewer’s findings changed over time in ai-16.
- Earlier notes on the same pipeline: "An agent learns to remember in the harness, not the weights." (ai-12), the same program-over-weights result for memory; and "The loop learned slowly from corrections and faster from verdicts." (ai-14), on which records an improvement loop should learn from.