r/MistralAI • • 5d ago • Bravo 1

Discussion / Opinion Using Mistral Large 4 for automated code reviews

We are a software company and we wanted to pick the best solution for automated code reviews. We spent some time comparing all open-source solutions we could find and then try out many models and configurations. In the end the winner was OCR with Mistral Large (Le Chonk for the win!).

We detailed the process in this article and I would love to hear from others what their experiences have been: https://tomassetti.me/ai-code-review-mistral-large/

19 Upvotes

4 comments sorted by

8

u/cristomc 5d ago

The PR/Code review has been an historical deal betwen developers to ensure that code keeps some quality, follows proper organization's patterns and the main one: TO SPREAD KNOWLEDGE among devs.

Automated code reviews sounds tempting to address the new issue made by AI. But let's focus on one thing: what's the point of AI assisted reviews for AI generated code?

I won't pick the point of ML4 (may be actually a good coder model), but if we refactor codebases with 20 PRs/day, who will have the proper knowledge to address issues if, for example, AI is unavailable (never happened ...right?) or a critical issue/last minute change introduced a structural problem to address?

Not trashing your research, but this problem is one that if gets a realistic fix may the next AI unicorn...

1

u/ftomassetti 5d ago

I think you are right, that we need a way to keep spreading knowledge. This is a topic we are reflecting on. What we are leaning forward is:
- Flag PRs that do architectural changes for human review
- Create tools that help getting an (updated) overview of the system

I am not saying we have figured this one out, but it seems really tedious to sit through a deluge of code reviews, and as human beings it is really hard to keep the attention high when dealing with "boring" code reviews. We would therefore at least identify some that could do without human eyes

1

u/cristomc 5d ago

For me (That I suffer this issue as I lead my team so I review all the PRs from seniors and juniors/contractors), the problem of AI generated code is not reviewing it: AI as a tool should output the code as expected since min 1 (ideal scenario, not the realistic one) so review on AI generated code shouldn't be even reviewed... but sadly that won't happen (non-deterministic output). So using the same non-deterministic output to review it seems dangerous. I don't know if I explaned it properly...

In addition of it, of course knowledge get lost, but that also happens when you lose a contractor from one day to another for example, but now with AI we are talking about higher magnitudes of knowledge lost since the code is generated (as AI won't retain knowlege... is a tool at the end of the day)

1

u/ftomassetti 5d ago

Well, the context of the reviewer (and possibly the model) would be different and in practice it finds issues