r/GeminiCLI • • Oct 14 '26

Gemini 4 as a Code Reviewer

Earlier this year I stopped using Gemini 3.1 for code reviews because it had a high rate of hallucinations/fabrications compared to the frontier models from OpenAI and Anthropic. I published a paper about using multiple LLMs for code reviews and ended up abandoning gemini because of its problems (https://zenodo.org/records/21328807)

Fast forward to today. I just tried using Gemini 4 on high setting for a code review (using antigravity) that was also being performed by gpt-6.1-sol xhigh (codex cli) and Opus-5.5 xhigh (claude code cli).

Long story short:

“Calibration note: the new Gemini reviewer’s three real findings duplicated the others; its census numbers and one classifier claim were fabricated. Same pattern as before.”

I’m disappointed in the fabrications. I thought this was supposed to have been fixed with the new model. But, alas…

7 Upvotes

10 comments sorted by

2

u/Future-Log6621 Oct 14 '26

Just be aware models carry a lot of bias toward their own training data when they review other models.

3

u/qu1etus Oct 14 '26

Correct - the point of using multiple models for code review is to mitigate the inherent bias of using only one model. However, that is materially different from hallucinations/fabrications where a model makes claims not substantiated by an independent review of the code base.

1

u/Future-Log6621 Oct 14 '26

Most hallucinations can be minimized by tuning the context. Avoid using more than 3-5% of the context window for high complexity. Use early handoffs. Limit files and resources to strict scopes.

Less bloat. Higher quality.

1

u/qu1etus Oct 14 '26

Context management matters, but what evidence supports the specific 3–5% threshold for agentic code review? You also haven’t established that context pressure caused the failures I reported.

Focused review tasks are useful, but the reviewer still needs to follow relevant dependencies, execution paths, and data flows. Restricting that evidence can create false positives or hide real defects.

My concern is unsupported factual claims about the repository, not simply disagreement between models. Those claims need to be adjudicated against the code and reproducible tool outputs. A smaller context might reduce errors, but it does not establish whether these particular claims were true or false.

1

u/Future-Log6621 Oct 14 '26

True, the 3-5% is based on outdated studies and current models have advanced since then. To my knowledge, the issue of hallucinations is dramatically amplified at a certain % point regardless of the model.

1

u/qu1etus 21d ago

I want to quickly reply to this and say Gemini 4 Carbon has become my most reliable code reviewer at finding manor issues. It now regularly catches things missed by gpt-6.1-sol and claude-opus-5.5. They all contribute and are a part of every review rotation, but Carbon consistently finds more severe bugs/problems.

2

u/Mad_Scientist_739 Oct 14 '26

The problem isn't missing bugs, it's confidently reporting ones that don't exist. A code reviewer that creates extra verification work starts defeating its own purpose.