Curated questions, not a measured ranking of real interview frequency. Updated 28/11/2026.
ACTIVE RECALL SESSION
0 / 25 reviewed
Try answering aloud before revealing the explanation.
Optional 30-minute timer30:00
Choose the questions most relevant to your interview and revise at your own pace.
QUESTION 01Python
What is the difference between a list, tuple, set and dictionary in Python?
A list is an ordered, mutable sequence; a tuple is an immutable sequence (although its elements may be mutable). A set stores unique hashable elements and is useful for membership tests. A dictionary maps hashable keys to values and preserves insertion order.
Use a list for changing ordered data, a tuple for a fixed record, a set for deduplication, and a dictionary for key-based lookup. Dictionary and set membership are average O(1); list membership is O(n).
QUESTION 02Statistics & Probability
Explain Bayes' theorem and the difference between a p-value and a confidence interval.
Bayes' theorem updates a prior belief using evidence: P(A|B) = P(B|A) × P(A) / P(B), assuming P(B) > 0. The posterior combines prior and likelihood.
A p-value measures how extreme the observed test statistic (or one more extreme) would be under the null hypothesis. It is not the probability that the null is true. A 95% frequentist confidence interval comes from a procedure that covers the fixed true parameter in 95% of repeated samples under its assumptions.
QUESTION 03SQL & Databases
What is the difference between INNER JOIN and LEFT JOIN? How does WHERE affect a LEFT JOIN?
INNER JOIN returns matching row pairs only. LEFT JOIN retains every left-table row, filling right-side columns with NULL when no match exists. Multiple matching rows can multiply the result.
A predicate on the right table in WHERE, such as WHERE orders.status = 'paid', can eliminate unmatched rows because the predicate is unknown for NULL. Put the predicate in ON when you want to retain unmatched left rows while matching only paid orders.
QUESTION 04Machine Learning
Explain linear regression, logistic regression, decision trees and random forests. When would you use each?
Linear regression predicts continuous values, commonly by minimizing squared residuals. Logistic regression predicts class probabilities using a sigmoid (binary) or a multiclass formulation and is a strong interpretable baseline.
A decision tree recursively splits data to reduce impurity or regression error. It models nonlinear interactions without scaling but can overfit. A random forest averages many trees trained with resampling and random feature subsets to reduce variance.
Choose according to target type, interpretability, validation performance, inference cost and the dataset. Compare against a simple baseline before choosing a more complex model.
QUESTION 05Machine Learning Evaluation
What is overfitting, and how do you choose precision, recall, F1 or ROC-AUC?
Overfitting occurs when the model learns training-specific patterns and generalizes poorly. Look for a gap between training and validation performance. Reduce it using regularization, early stopping, suitable model complexity, representative data and leakage-safe cross-validation.
Precision = TP/(TP+FP), recall = TP/(TP+FN), and F1 is their harmonic mean. Prioritize precision for costly false positives and recall for costly missed positives. ROC-AUC measures ranking across thresholds; PR-AUC is often more informative with rare positives. Tune the decision threshold on validation data, then evaluate once on a held-out test set.
QUESTION 06Deep Learning & Computer Vision
How does backpropagation work, and why are CNNs useful for images?
The forward pass computes predictions and a loss. Backpropagation applies the chain rule to obtain gradients of the loss with respect to each parameter. An optimizer updates parameters, e.g. θ ← θ − η∇L for gradient descent.
CNNs use local, shared kernels to extract spatial features with fewer parameters than a comparable dense connection pattern. Stride, padding and pooling control spatial resolution. Residual connections, appropriate initialization and normalization help train deep networks. Use task-specific validation, such as IoU/mAP for detection or Dice for segmentation.
QUESTION 07NLP & Transformers
How does self-attention work, and what is the difference between an encoder and decoder?
Self-attention projects tokens into queries Q, keys K and values V. Attention = softmax(QKᵀ/√dₖ)V; the mask restricts which keys may be attended to. Multiple heads learn different relationships, with positional information preserving sequence structure.
Encoder-only models typically use bidirectional attention for representation tasks. Decoder-only LLMs use causal attention to predict the next token without seeing future tokens. Encoder-decoder models use cross-attention to condition generation on the encoded input. Dense attention has quadratic pairwise interactions in sequence length; KV caching avoids recomputing prior keys/values during autoregressive decoding.
QUESTION 08Generative AI & RAG
When should you use RAG, fine-tuning or corrective RAG (CRAG)?
RAG retrieves relevant external documents, optionally reranks them, and places evidence in the model context to improve grounding and freshness. It does not guarantee correctness; evaluate retrieval recall, faithfulness and citation validity.
Fine-tuning changes model behavior or task adaptation; LoRA trains low-rank adapters with frozen base weights. It is not a reliable way to keep frequently changing facts current.
CRAG evaluates retrieved evidence quality and uses corrective steps such as refinement or alternative retrieval when evidence is weak. Choose RAG for external knowledge, fine-tuning for behavior, and corrective retrieval when retrieval failures warrant extra quality checks.
QUESTION 09Agentic AI
What distinguishes an AI agent from a predefined workflow, and how do you make tool calling reliable?
A predefined workflow follows an explicit control flow. An agent dynamically chooses actions/tools based on its goal, state and observations. ReAct-style systems interleave actions and observations, with a clear stop condition.
Use typed tool schemas, server-side validation, scoped credentials, explicit authorization, bounded steps/time/cost, retries with idempotency, checkpoints and human approval for sensitive or irreversible actions. Treat retrieved/tool-provided text as untrusted data, not authority. Evaluate task success, tool correctness, failure recovery and side effects rather than just text quality.
QUESTION 10MLOps, Backend & System Design
How would you design, deploy and monitor a scalable AI inference API?
Define task quality, p95 latency, traffic, cost, privacy and availability targets. A gateway authenticates and rate-limits; a router sends requests to bounded workers that load the model and optionally batch compatible inputs. Use asynchronous queues for long jobs and streaming for interactive outputs.
Validate request schemas and per-resource authorization. Scope caches by model/data version and permissions; use timeouts, bounded retries, backpressure and fallbacks. Version data, code, model and prompts; deploy via canary with rollback. Monitor latency, throughput, errors, GPU memory, cost, quality, drift and evaluation regressions. Measure real workload before scaling.
QUESTION 11AI & LLM Fundamentals
What is the difference between AI, Machine Learning, Deep Learning and Generative AI?
AI is the broad goal of machines doing tasks that need intelligence. Machine Learning (ML) is a subset that learns patterns from data. Deep Learning (DL) is ML using many-layer neural networks. Generative AI is DL that produces new content such as text, code or images; LLMs are the text-focused kind.
QUESTION 12AI & LLM Fundamentals
What are tokens, tokenization and a context window, and why do they matter for agents?
A token is a chunk of text (often a word piece) that the model reads and writes.
Tokenization converts text to token IDs. The context window is the maximum number of tokens the model can
consider at once, covering the prompt, history, tool outputs and the reply. Agents fill context fast, so cost, latency
and quality all depend on managing it.
QUESTION 13AI & LLM Fundamentals
Explain embeddings and how the Transformer's attention mechanism works at a high level.
An embedding is a vector that represents meaning, so similar texts are close in
vector space. A transformer uses self-attention: each token computes weights over all other tokens to decide which
ones matter for its representation, which lets it capture long-range context in parallel.
QUESTION 14AI & LLM Fundamentals
What do temperature, top-p and system prompts control, and how do you get structured
output?
Temperature scales randomness of token sampling (low is more deterministic).
Top-p limits sampling to the smallest set of tokens whose probability adds up to p. A system prompt sets role and
rules for the whole conversation. For structured output, use the provider's JSON-schema or structured-output
feature (or tool calling) and validate the result in code.
QUESTION 15AI & LLM Fundamentals
What is function calling (tool calling) at a high level?
You describe functions to the model with names, descriptions and JSON schemas.
When useful, the model returns a structured request to call one with specific arguments. Your code executes it and
sends the result back; the model never runs code itself. Module 4 covers this in depth.
QUESTION 16AI & LLM Fundamentals
What is hallucination, why does it happen, and how do you reduce it? What is grounding?
Hallucination is a fluent but false or unsupported output. It happens because an
LLM predicts plausible text, not verified truth. Grounding ties answers to trusted sources (retrieved documents,
database results, tool outputs). Reduce it with retrieval, citations, validation, narrow scopes and allowing the model
to say 'I don't know'.
QUESTION 17AI & LLM Fundamentals
What can an LLM do on its own and what can it not do without help?
On its own an LLM can generate, summarise, classify, translate and reason over
text in its context. Without tools it cannot access live data, take actions, remember across sessions, run reliable
computation or verify facts. Agents add tools, memory and control loops to cover these gaps.
QUESTION 18Agentic AI Fundamentals
What is an AI agent? What is Agentic AI?
An AI agent is a system where an LLM decides which actions to take, uses tools to
act, observes the results and repeats until a goal is met or a stop condition fires. Agentic AI is the broader approach
of building systems with that kind of goal-directed autonomy. Anthropic's definition: agents are LLMs dynamically
directing their own process and tool use.
QUESTION 19Agentic AI Fundamentals
How is an AI agent different from a chatbot, an LLM application and traditional automation?
A chatbot converses. An LLM application calls a model for a fixed task. An agent
loops with tools toward a goal and decides its own steps. Traditional automation (scripts, RPA, cron jobs) follows
fixed rules with no model judgement.
QUESTION 20Agentic AI Fundamentals
What is the difference between Generative AI and Agentic AI?
Generative AI creates content in response to a prompt. Agentic AI uses generative
models to pursue goals: plan, call tools, observe, adapt and act. Generative AI is a capability; agentic AI is a system
design built on it.
QUESTION 21Agentic AI Fundamentals
What are the core components of an agent, and what is the agent loop?
Core components: a model (reasoning), instructions (role and rules), tools (actions),
memory and state (context across steps), and an orchestration loop with guardrails and stop conditions. The loop is:
observe the state, reason about the next step, act, observe the result, and repeat.
QUESTION 22Agentic AI Fundamentals
When should you use an agent, and when is a simple chain or plain Python better?
Use plain code when the steps are known and rules are clear. Use a fixed chain or
workflow when the path is predictable but needs language understanding. Use an agent only when the steps cannot
be known in advance, the task is open-ended and some errors are tolerable or reviewable. Anthropic's guidance is
to find the simplest solution and add complexity only when needed.
QUESTION 23Agentic AI Fundamentals
What are autonomous agents, semi-autonomous agents and deterministic workflows?
Deterministic workflows follow code-defined steps. Semi-autonomous agents
choose actions but pause for human approval on risky steps. Autonomous agents run end to end within limits. Most
production systems sit in the middle, with autonomy granted per action based on risk.
QUESTION 24Agentic AI Fundamentals
What are the advantages, limitations and common misconceptions about agents?
Advantages: handle open-ended tasks, adapt using tool feedback, automate
multi-step work. Limitations: cost, latency, non-determinism, error compounding across steps, hard evaluation and
security exposure. Misconceptions: agents are not always autonomous, not always multi-agent, not guaranteed
correct and not always better than workflows.
QUESTION 25Agentic AI Fundamentals
What is a stopping condition and why must every agent have more than one?
A stopping condition tells the loop when to end. Every production agent needs
several: task done, maximum steps, token or cost budget, wall-clock timeout and repeated-failure or repeated-action
detection. Without them an agent can loop forever and run up cost.
KEEP LEARNING
More questions are coming.
Stay connected with us!
Ready for your interview?
Focus on clear explanations, tradeoffs and practical examples.