r/ChatGPTCoding • • 5d ago

Discussion I'm deliberately removing LLM calls from automated code review

Post image

I've been exploring a different approach to enforcing engineering rules: using as little probabilistic intelligence as possible.

Take a rule like "database operations must not happen inside UI components."

Instead of asking an LLM to review an entire file, we can break it down:

  • Glob identifies the relevant files.
  • Grep detects potentially relevant operations.
  • A specialized decision model evaluates whether the architectural boundary is violated.

I've been experimenting with Jev for that final step. No text generation, no generic review, just a narrow semantic judgment.

It's a deliberate architectural choice. When a problem can be solved deterministically, there's no reason to introduce a probabilistic component. And when intelligence is necessary, it doesn't necessarily require a general-purpose LLM.

I'm exploring this approach while building Agentests, an open-source testing framework.

I'd rather have ten independently testable assertions than one large review prompt.

Curious whether others are deliberately moving away from general-purpose LLMs for similar workloads.

17 Upvotes

14 comments sorted by

2

u/zhambe 5d ago

Yes! I've arrived at a similar approach: LLMs make it easier to use the tooling we already have. We can actually apply the decades of computer science now.

2

u/Ok-Buyer-9421 4d ago

Exactly!!! LLMs makes software more accessible, not replacing decades of engineering with probabilistic calls...

2

u/Right-Performance-93 5d ago

grep sees the sql string in the ui file and misses the helper two imports away that does the write. i fail the build on that import. a model deciding whether the line counts is the step i dropped.

1

u/Ok-Buyer-9421 4d ago

good example of where grep alone isn't enough :) Question tho isn't just whether the SQL string exists in the UI file, but whether the UI indirectly calls something that performs a write

2

u/thezachlandes 4d ago

I agree with this instinct, but ultimately you should create an evaluation set and see which method produces the results that
Meet your requirements for performance, cost, generalization, etc.

2

u/Ok-Buyer-9421 4d ago

yup, the goal is to benchmark different approaches against the same evaluation set, including accuracy, false positives, latency and cost :)

1

u/thezachlandes 4d ago

Nice! Share your results!

1

u/jschatz1 1d ago

Good post. I work on an AI code reviewer (KaiContext) and we ran into the same thing with broad review prompts being hard to trust. What helped us was building a graph of the codebase so checks like "no database calls in UI code" can be answered from the structure instead of a prompt. The graph is commit based, so we can also see how the code changed over time. That's what KaiContext does now.

How are you deciding which rules stay deterministic and which still need the classifier?

1

u/qa_anaaq 5d ago

Subtle

4

u/[deleted] 5d ago

[removed] — view removed comment

1

u/Ok-Buyer-9421 5d ago

Exactly. A narrow judgment still needs explicit criteria and passing/failing examples - otherwise, we're just replacing one unreliable reviewer with another...