Review a messy Python pull request out loud

MediumConcept30 minSWEREMLEPro outline

The question

You are given a pull request that adds a function to batch documents, call an embeddings API and write results to disk. It works on the author's laptop, but the code is messy: no error handling, global state, a hard-coded API key, no tests and one function of 150 lines.

Review it out loud. What do you flag, in what order, and how do you phrase the feedback?

What the interviewer is looking for

  • Prioritizes correctness and security issues before style
  • Spots concrete bugs: retries, partial failures, rate limits, resource leaks
  • Suggests specific, small changes rather than a rewrite
  • Asks for tests and explains which ones
  • Gives feedback in a respectful, actionable way

Your answer

Saved in this browser only. Nobody else sees it.

Why this question

Reported in: supacv.com

Practice question written by BlogLLM based on publicly reported interview formats. Not an official Mistral AI question.