Chapter 67

AI ইন্টারভিউ প্রস্তুতি

AI Interview Preparation
🎯 AI Interview-এর গঠন
সাধারণত ৫ stage: (1) Recruiter screen → (2) Technical coding → (3) ML breadth/depth → (4) ML system design → (5) Behavioral। প্রতি stage-এ আলাদা প্রস্তুতি দরকার।

Stage 1: Coding (DSA + ML)

  • LeetCode Top 150 — easy/medium-এ fluent হন।
  • NumPy/Pandas — vectorized solution।
  • "Implement X from scratch" — k-means, logistic regression, attention।
  • PyTorch live coding — DataLoader, training loop।
# Classic: scaled dot-product attention from scratch
import torch, math
def attention(Q, K, V, mask=None):
    d_k = Q.size(-1)
    scores = Q @ K.transpose(-2,-1) / math.sqrt(d_k)
    if mask is not None: scores = scores.masked_fill(mask==0, -1e9)
    return torch.softmax(scores, dim=-1) @ V

Stage 2: ML Breadth

Quick-fire concept question — ১-৩ মিনিটে clear উত্তর।

  • Bias-variance tradeoff।
  • Overfit vs underfit — symptom ও remedy।
  • Regularization — L1/L2, dropout, early stop।
  • Precision/Recall/F1, ROC-AUC, PR-AUC কখন কোনটা।
  • Cross-validation strategy (stratified, group, time-series)।
  • Gradient descent variants।
  • Batch norm vs layer norm vs RMS norm।
  • Encoder vs decoder vs encoder-decoder transformer।
  • LoRA, QLoRA, PEFT।
  • RAG vs fine-tuning কখন কী।

Stage 3: ML Depth

একটা topic-এ deep dive — paper details, math, trade-off।

  • "Transformer-এ positional encoding কেন লাগে? RoPE vs ALiBi?"
  • "BERT pretraining objective derive করুন।"
  • "Diffusion forward/reverse process explain করুন।"
  • "DPO vs PPO RLHF-এ?"

Stage 4: ML System Design (সবচেয়ে গুরুত্বপূর্ণ)

Senior role-এ এটাই deciding factor। Framework:

  1. Clarify — user, scale, latency, budget।
  2. Metric — online (CTR, retention) + offline (AUC, NDCG)।
  3. Data — source, labeling, leakage, freshness।
  4. Feature — feature store, online/offline parity।
  5. Model — baseline → complex, candidate gen + ranker।
  6. Training — schedule, retraining frequency।
  7. Serving — batch/online, cache, fallback।
  8. Monitor — drift, performance, A/B test।
💡 প্রচলিত ML System Design Q
  • Design YouTube recommendation।
  • Design Uber ETA prediction।
  • Design ChatGPT (multi-turn LLM serving)।
  • Design fraud detection।
  • Design search ranking।
  • Design ad CTR prediction।

Stage 5: Behavioral (STAR)

প্রতিটি story-তে: Situation → Task → Action → Result। নিজের ৬-৮টি story আগেই তৈরি রাখুন।

  • "একটা challenging project বলুন।"
  • "Conflict কীভাবে handle করেছেন?"
  • "Failed project থেকে কী শিখেছেন?"
  • "কেন এই company?"

Resource Stack

  • Book: Designing ML Systems (Chip Huyen), ML Interviews (Khang Pham)।
  • Course: Educative "Grokking the ML Interview", Stanford CS329S।
  • Mock: interviewing.io, Pramp, friend pair।
  • Blog: Eugene Yan, Chip Huyen, Vicki Boykis।
⚠️ Red Flag যা avoid করবেন
  • "I don't know" বলে চুপ — instead বলুন কীভাবে approach নিতেন।
  • Buzzword spam ("we used LangChain") — depth ছাড়া।
  • Metric ছাড়া project বর্ণনা।
  • Trade-off না বলা।

সারসংক্ষেপ

✨ এই অধ্যায়ে যা শিখলাম
  • ৫-stage interview pipeline।
  • Coding, breadth, depth, system design, behavioral।
  • ML System Design 8-step framework।
  • STAR + ৬-৮টি pre-baked story।