Hiring

20 interview questions for Python developers specialised in AI

The questions we use ourselves to tell experience from enthusiasm. Python fundamentals first, then the AI specialism. For interviewers, and for candidates preparing.

Hiring2 min readPython People editorial team

Python fundamentals

  1. How do you use type hints and Pydantic, and where does the checking stop?
  2. How do you test code that calls an external API? When do you use a mock and when a fixture?
  3. When do you choose async, when threads or processes, and what role does the GIL play?
  4. How do you pin dependencies so a build still produces the same result a year from now?
  5. An endpoint is slow. How do you find out where the time goes?

Listen for: strong candidates talk about trade-offs and real cases. Weaker candidates mostly name the latest library.

Language models and retrieval

  1. Tell me about an LLM application you took to production. What went wrong after launch?
  2. How do you measure whether a RAG system gives good answers?
  3. A knowledge assistant gives a wrong answer. How do you tell whether retrieval or generation is at fault?
  4. How do you make sure model output always has the expected format?
  5. When would you consider fine-tuning?

Agents, APIs and operations

  1. Which actions may an agent take on its own in your design, and where does a human decide?
  2. How do you protect an application against input that tries to steer the model?
  3. How do you build a FastAPI endpoint that streams a long answer without blocking your service?
  4. How do you keep the cost per outcome under control?
  5. How do you notice that an application in production is getting worse?

Ways of working and judgement

  1. How do you use AI coding assistants, and what do you deliberately not use them for?
  2. How do you review code that was largely written by an assistant?
  3. Tell me about an AI idea you advised against. Why?
  4. How do you explain to a board what an application can and cannot do?
  5. How do you keep up in a field that changes every month?

Need a Python developer?

Call us or send your vacancy. Within 48 hours you hear which developers in our network fit and what it costs.