Skip to content
tezvyn:

🤖AI & ML

Artificial intelligence, machine learning, and data science

127 bites

Test yourself: Top 30 advanced AI & ML interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Advanced interview questions in AI & ML, page 7

advanced2 min read

Trade-offs between dense and sparse retrieval in RAG?

This question tests your grasp of information retrieval fundamentals and their practical trade-offs in a modern RAG system. A strong answer first defines dense (semantic) and sparse (keyword) retrieval, then contrasts their performance on different query types, and finally analyzes their operational costs (compute, storage, latency). A common red flag is declaring dense retrieval universally superior without acknowledging its weaknesses, particularly with keywords and identifiers.

What is the KV cache and why does it matter for serving LLMs?
advanced3 min read

What is the KV cache and why does it matter for serving LLMs?

This question tests your understanding of performance bottlenecks in autoregressive LLM inference. A great answer first explains that the attention mechanism computes Key (K) and Value (V) tensors for all input tokens. Then, it highlights the redundancy of recomputing these for past tokens at each new generation step. The KV cache solves this by storing these tensors, drastically reducing latency. A red flag is vaguely calling it a 'cache' without connecting it to K/V tensors.

advanced2 min read

Why are MoE models larger but cheaper to run?

This tests your understanding of sparse activation versus dense models. A great answer defines Mixture-of-Experts (MoE) as a system with a router and multiple expert sub-networks, explaining that only a fraction of the total parameters are activated for any given token, which drastically reduces computational cost (FLOPs) during inference. A red flag is describing MoE as a simple ensemble without mentioning the sparse routing mechanism that enables its efficiency.

advanced2 min read

When would you use LoRA vs full fine-tuning?

This tests your grasp of practical trade-offs in ML systems, specifically training cost versus model customization. A great answer explains that LoRA is a parameter-efficient method ideal for resource-constrained scenarios, reducing trainable parameters by 10,000x and GPU memory by 3x. Full fine-tuning is for high-budget projects requiring deep model changes. A red flag is vaguely saying LoRA is 'cheaper' without quantifying the resource savings or explaining the mechanism.

How to reduce hallucination in a production LLM application?
advanced2 min read

How to reduce hallucination in a production LLM application?

This tests your ability to design a robust, multi-layered system for AI safety, not just your model knowledge. A great answer starts with data-level grounding (RAG), moves to model-level tuning (temperature, fine-tuning), and finishes with application-level safeguards (validation, feedback loops). A red flag is focusing only on prompt engineering or stating it's an unsolvable problem without offering concrete mitigation strategies.

Explain Supervised Fine-Tuning, RLHF, and DPO
advanced3 min read

Explain Supervised Fine-Tuning, RLHF, and DPO

This tests your understanding of modern LLM alignment techniques. A strong answer explains that Supervised Fine-Tuning (SFT) teaches the model a task via imitation, while RLHF and DPO align it with human preferences. RLHF uses a reward model and reinforcement learning, whereas DPO is a simpler, direct optimization method. The key red flag is conflating these distinct stages or failing to explain the 'reward model' step in RLHF.

What is the vanishing gradient problem and how do transformers avoid it?
advanced2 min read

What is the vanishing gradient problem and how do transformers avoid it?

This tests your understanding of core deep learning training issues and the transformer's specific architectural solutions. A great answer defines vanishing gradients in sequential models, then explains how the transformer's parallel attention mechanism creates direct, short paths for gradients between any two tokens, regardless of distance. A red flag is vaguely mentioning 'attention' without explaining why its parallel nature is the key to solving the problem for long sequences.

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