The weird part isn't writing the prompt, it's that you have to actually disagree with the AI on the spot.
Demonstrate a structured review process: first craft a precise prompt to the AI that includes the code, context, and specific review goals, then critically evaluate the AI's response by verifying each claim against the code and your own knowledge. Highlight where the AI is correct, where it hallucinates, and what edge cases it missed, showing you can leverage AI while maintaining engineering rigor.
Pro tip: Treat the AI as a junior engineer: its suggestions are starting points, not gospel. Always verify with tests or manual reasoning, and explicitly call out when the AI's confidence is misplaced.
Write a prompt that gives the AI the code, the context (e.g., language, purpose), and asks for specific types of issues (bugs, performance, edge cases). This sets the stage for a focused review.
Go through each point the AI raises. For each, determine if it's a real issue by tracing the code or reasoning about inputs. Accept valid fixes and reject hallucinations with justification.
Think about inputs or scenarios the AI didn't consider, such as empty inputs, boundary values, concurrency, or error conditions. Explain why they matter.
Synthesize the valid AI suggestions with your own fixes for missed edge cases into an improved version of the code, explaining the changes.
Summarize lessons learned about using AI as a reviewer, such as the importance of verification and the types of errors AI tends to make.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.