Easy interview questions in AI & ML, page 3
Walk me through essential Dockerfile commands for a reproducible Python ML environment
Tests your ability to containerize Python ML scripts reproducibly. A strong answer covers FROM with a pinned slim image, WORKDIR, COPY for requirements and code, RUN pip install, and CMD or ENTRYPOINT.
How a convolutional layer works
Learnable kernels slide over the input computing dot products, with stride controlling step size and padding controlling output size.
How do you structure a Dockerfile to leverage layer caching for dependencies?
Tests Docker layer invalidation and cache-aware instruction ordering. Copy requirements.txt and run pip install before source code so deps cache independently. Red flag: copying everything at once or installing deps after code, busting cache every build.
Max pooling versus strided convolution
Pooling downsamples and adds small translation invariance with no parameters; strided conv learns its downsampling but adds parameters.
Why CNNs need nonlinear activations like ReLU
ReLU introduces nonlinearity letting stacked layers model complex functions; without it any stack collapses to a single linear map.
Describe a basic RAG architecture and its two main components
This tests retrieval-generation separation. Good answers name the retriever, which fetches relevant documents, and the generator, which synthesizes an answer using those documents plus the query.
Handling missing numerical values
Dropping rows is simple but loses data and can bias if missingness is non-random; mean or median imputation keeps rows but shrinks variance and ignores correlations; model-based imputation is…
How do you containerize a Python training script for GPU cloud VMs?
This tests reproducible GPU containerization. A strong answer uses an NVIDIA CUDA base image, installs Python dependencies at build time, copies the training script, and runs with --gpus.

Difference between data and model parallelism, and when to prefer each
Tests split axis: data parallelism replicates model and shards data; model parallelism shards model across devices. Use data parallelism for throughput; model parallelism when layers exceed GPU memory.

How does function calling work in modern LLMs?
Schemas in the prompt; model emits JSON name and arguments; client executes and returns results.
Image classification versus object detection
Classification assigns one label to the whole image; detection localizes and labels multiple objects with bounding boxes and class scores.

Walk me through building a weather agent with get_weather
Register get_weather, let the model emit parameters, execute it yourself, feed the result back, then synthesize the answer.
Intersection over Union for detection
IoU is the area of overlap divided by the area of union of predicted and ground-truth boxes; a threshold decides true positives.
Mean Average Precision in object detection
AP is the area under the precision-recall curve per class; mAP averages AP over classes, and COCO also averages over IoU thresholds.
Describe the difference between ETL and ELT and when to choose each
Tests transform timing and compute location. ETL cleans data before loading via external engines; ELT loads raw data first, then transforms in the warehouse. Pick ETL when pre-load cleansing is needed, ELT when warehouse compute is cheaper.
Key differences between traditional and ML CI/CD pipelines?
Contrast code deploys with data versioning, model registries, and retraining; note holdout eval.

Star schema vs snowflake schema: differences and trade-offs
Tests dimensional modeling: star schemas flatten dimensions for fast joins and simple queries, while snowflakes normalize them to cut redundancy at the cost of extra joins. Red flag: praising snowflake storage savings without admitting query overhead.

What automated tests belong in CI before deploying a classification model?
Name data schema checks, performance regression vs baseline, bias audits, and artifact integrity.
Explain GAN architecture, generator and discriminator roles, and objective function
Tests adversarial training as a minimax game. Strong answers: generator maps noise z to fakes; discriminator classifies real versus fake; both optimize V(D,G)=E[log D(x)]+E[log(1-D(G(z)))].
Semantic versus instance segmentation
Semantic segmentation labels each pixel by class but merges objects of the same class; instance segmentation also separates individual objects.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles