---
id: 6343
lang: en
title: "Automating Code Review: How Neural Networks Are Taking Over Developer Grunt Work"
published_at: "2026-10-18 00:55:27"
source_name: "Habr AI"
source_url: "https://habr.com/ru/companies/avito/articles/1024954/?utm_campaign=1024954&utm_source=habrahabr&utm_medium=rss"
canonical_url: "https://news.hamidun.com/en/news/6343"
categories: ["llm", "business"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# Automating Code Review: How Neural Networks Are Taking Over Developer Grunt Work

> **Краткая суть (BLUF):** The company built an automated code review system that processes thousands of pull requests per week. Developers only need to leave an ai_review comment on a PR — the event then flows into the Data Bus, a Go service parses the command and sends the context to the ML pipeline. A Python service generates comments in 10–20 seconds for small PRs (or up to a minute for large ones) and publishes them back to the interface.  The architecture has three components: Stash (the developer interface), a Go service (the event orchestrator), and the Python ML Pipeline service (the comment generator). The most critical piece turned out to be validation — the second stage, ReviewFilter, filters out 90% of hallucinations and pushes precision up to 85%.  • **RuleChecker, ReviewFilter, CommentAggregator** — the three stages of the ML pipeline: generating all potential issues, validating by importance, and deduplicating by semantics using BAAI/bge-m3 • **Qwen3-Coder-30B-Instruct-FP8** — the second-ranked model on the MERA-RuCodeReviewer leaderboard (689 examples in Java, Python, Scala, Go) • **Metrics**: 85% precision, 32% outdated rate (60% for Infra/DevOps), 650 parallel reviews processed

## Why Automation Is Necessary

Avito generates a thousand pull requests a week — up to 300 simultaneously during peak hours. This creates an enormous load on developers, who get pulled away from their core work to do code review. The result: PRs can sit in the review queue for days, time-to-market for new features increases, and the team gets fatigued and may miss critical bugs.

The LLM engineering team set three goals for automation:

• **Speed up development** — eliminate review queues
• **Reduce the human factor's influence** — constant context-switching causes developers to lose focus
• **Unify the process** — different reviewers give different feedback, often introducing subjectivity

## System Architecture

The system consists of three components linked in a clear workflow:

1. **Stash** — the interface where a developer leaves an ai_review comment on a PR
2. **Go service** — receives the event from the Data Bus, parses the command, pulls the diff and repository metadata, stores the review in the database with status STATE_REQUESTED, and sends an RPC to the ML service
3. **Python ML Pipeline service** — processes the context and returns generated comments

The ML service responds with 200 OK immediately so it doesn't block the Go service — generation can take a while.

## ML Pipeline: Three Stages

**RuleChecker (generation)**. The model identifies all potential issues, drawing on a taxonomy of errors built from the team's real PRs. It's optimized for high recall, even at the cost of false positives. The output is a JSON with line numbers and recommendations.

**ReviewFilter (validation)**. A second pass improves precision. The model works in a Conclusion First pattern — it receives the same context plus a specific comment and answers whether that remark is important or not. It filters out 90% of hallucinations and false positives.

**CommentAggregator (deduplication)**. The system builds comment embeddings using BAAI/bge-m3 and computes cosine similarity. If similarity exceeds 0.85, comments are grouped together. Only the most substantive comment from each group survives. The output is a final list of unique remarks.

## Model Choice and Performance

On the MERA-RuCodeReviewer benchmark (689 examples in Java, Python, Scala, Go), Gemini 2.5 Flash leads, but the team chose **Qwen3-Coder-30B-Instruct-FP8** (ranked second) because it's open-source and can be hosted on their own infrastructure. This matters: the code never leaves for external APIs, and self-hosting is cheaper at scale (PRs require 2,000–10,000 tokens).

Performance:
• Small PRs (up to 3 files): **10–20 seconds**
• Large PRs (10+ files): **~60 seconds**
• Maximum of **650 parallel reviews**

Quality metrics are gathered from developer likes:
• **Precision**: 85% of comments are classified as good
• **Outdated rate**: 32% (comments closed by a developer fixing the issue). For Infra and DevOps, this reaches 60%.

## Key Takeaways

The core idea: **separating Recall and Precision works better than a single request**. Even with a long context window, a model loses track of things, so a multi-stage system is necessary. Validation that filters out hallucinations is critical — it's the foundation of user trust.

The model needs to see the full code of files and the repository structure — a diff alone isn't enough for quality analysis. AI takes over the grunt work, but humans must still oversee the process.

---
- **Первоисточник:** [Habr AI](https://habr.com/ru/companies/avito/articles/1024954/?utm_campaign=1024954&utm_source=habrahabr&utm_medium=rss)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/6343
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
