Technical practice
How would you structure a Python application that trains a model and serves predictions?
What to coverSuggested answer focus: explain how you would separate data preparation, training, inference, and API code using clear interfaces and object-oriented design where useful. Discuss how you would keep the code documented, testable, and maintainable.
How would you clean and inspect a dataset before training?
What to coverSuggested answer focus: describe checks for missing values, duplicates, inconsistent types, and unexpected distributions using tools such as Pandas or NumPy. Explain how the findings would guide preprocessing rather than assuming one cleaning rule fits every dataset.
How would you engineer features without leaking information into evaluation?
What to coverSuggested answer focus: explain how you would choose features relevant to the business goal and fit preprocessing steps on training data only. Discuss how leakage can make evaluation results misleading.
How would you train and evaluate a machine-learning model?
What to coverSuggested answer focus: describe a baseline, an appropriate data split, and metrics chosen for the task and business objective. Explain how you would interpret errors, not just report a single score.
What would you try if a model performed well on training data but poorly on unseen data?
What to coverSuggested answer focus: discuss checks for overfitting, data quality, and differences between training and evaluation data. Compare possible changes such as simpler models, regularization, or better features, and say how you would test whether they help.
How would you design and evaluate a prompt for an LLM-powered feature?
What to coverSuggested answer focus: explain how you would specify the task, context, and expected output, then test the prompt against representative and difficult inputs. Discuss trade-offs between output quality, consistency, latency, and API cost.
How would you integrate an AI API into a Python application?
What to coverSuggested answer focus: describe request and response handling, configuration, error handling, and validation of outputs before the application uses them. Explain what you would do when the external API is slow, unavailable, or returns an unsuitable response.
How would you expose a model through a REST API for a web application?
What to coverSuggested answer focus: outline a prediction endpoint using FastAPI, Flask, or Django, including JSON input validation and a clear response format. Discuss how you would handle model loading, errors, and changes to the API contract.
How would you trace a faulty prediction from a web request back to its source?
What to coverSuggested answer focus: walk through checking the JSON payload, application logic, preprocessing, model version, and underlying SQL data where relevant. Explain how tests, readable code, and Git history could help isolate a change.
When might retrieval-augmented generation be useful alongside an LLM?
What to coverSuggested preparation for a topic listed as a plus, not a core requirement: explain how retrieval from a vector database could supply relevant context before generation. Compare that approach with prompting an LLM alone, including the need to evaluate retrieval quality and generated answers.
Behavioural practice
Tell me about a time you clarified an unclear business requirement before building a solution.
What to coverSuggested answer focus: use a real situation, the questions you asked, the action you took, and the result. Explain how the clarified goal affected your technical choices.
Describe a time you collaborated with developers to integrate or improve a feature.
What to coverSuggested answer focus: give a real example covering your role, how you communicated interfaces or changes, and the result. Include how you handled a differing technical view if one arose.
Tell me about a time you diagnosed a difficult data, model, or application problem.
What to coverSuggested answer focus: describe the symptoms, your investigation, the evidence behind your fix, and the result. Distinguish what you verified from what you initially suspected.
Describe a time you had to prioritize competing tasks against a deadline.
What to coverSuggested answer focus: use a real situation to explain how you assessed urgency and impact, communicated trade-offs, and acted. State the outcome and anything you would change next time.
Tell me about a time you learned or used a new AI or Python tool for development.
What to coverSuggested answer focus: describe why you chose the tool, how you checked its output, and what resulted. If an AI coding assistant was involved, explain how you kept responsibility for code quality and correctness.