·3 min read·Codeverdict Team

How to Detect ChatGPT in Coding Interviews

Exploring methods for detecting AI-generated code in technical interviews, and why you should probably change your interview strategy instead.

The New Reality of Hiring

Since the release of ChatGPT, GitHub Copilot, and Claude, technical hiring managers have been panicking. The internet is flooded with questions: How do we stop candidates from using AI? How do we detect ChatGPT in a take-home test?

If a candidate can copy-paste a LeetCode problem into an LLM and get a perfect O(log n) solution in 4 seconds, the traditional technical screen is broken.

Methods for Detecting AI-Generated Code

If you are committed to catching AI usage, there are a few heuristics and tools you can look at:

  1. Perfect, Generic Comments: AI models tend to over-explain code with perfectly grammatical, somewhat robotic comments (e.g., // Initialize the counter variable to zero).
  2. Unusual Library Choices: Sometimes an LLM will pull in an obscure or outdated library to solve a problem because it was prominent in its training data, rather than using standard modern practices.
  3. Speed of Completion: If a candidate finishes a complex 2-hour assessment in 14 minutes, that's a strong signal.
  4. AI Detection Tools: There are emerging tools that analyze code structure and syntax to predict the likelihood of AI generation. (Note: These are notoriously prone to false positives).
  5. The Follow-Up Interview: The most reliable detection method. Bring the candidate on a call and ask them to explain specific, nuanced decisions in their submitted code. If they can't explain why they wrote it, they didn't write it.

The Hard Truth: You Are Asking the Wrong Question

Trying to detect and ban AI in coding interviews is a losing battle. It is an arms race you cannot win.

More importantly: Why do you want to ban it?

When your engineers are on the job, do you ban them from using GitHub Copilot? Do you tell them they aren't allowed to use ChatGPT to scaffold a boilerplate component? Of course not. You want them to use every tool available to ship features faster.

If AI helps engineers build faster in the real world, your interview process should reflect that.

Pivot to Real-World Assessments

The reason AI breaks traditional algorithmic interviews (like HackerRank) is because those puzzles are isolated, atomic, and have well-documented definitive answers. They are perfectly suited for LLMs.

LLMs are great at solving puzzles. They are still relatively bad at building complete, multi-file software architectures from scratch.

Instead of trying to catch cheaters on algorithm tests, change the test:

  1. Ask for Architecture: Have them build a small React application that requires connecting multiple components, managing complex state, and integrating an external API.
  2. Encourage AI Use: Tell candidates, "You are allowed to use ChatGPT and Copilot. We are evaluating what you can build with these tools, not just your raw syntax recall."
  3. Evaluate the Output, Not the Process: Grade them on the quality of the final product, the architecture, the readability, and how well it solves the user's problem.

How Codeverdict Helps

If you want to evaluate candidates on real, complex projects where AI is a tool rather than a cheat code, you need a platform designed for repository-level evaluation.

Codeverdict allows you to grade full GitHub repositories automatically. We evaluate the candidate's final architecture, code quality, and product functionality—testing them on the skills that actually matter in the age of AI.