Skip to content
tezvyn:

🤖AI & ML

Artificial intelligence, machine learning, and data science

615 bites

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

Intermediate everything in AI & ML, page 4

intermediate1 min read

Prompt injection versus jailbreak, and defenses

Injection hijacks the model via untrusted data overriding developer instructions; jailbreak coaxes a model past its safety policy. Defense: separate trusted instructions from untrusted data and filter.

intermediate1 min read

Designing input and output guardrails for a chatbot

Input guardrails filter or classify user prompts (injection, off-topic, PII) before the model; output guardrails validate responses for toxicity, leakage, and policy before sending.

intermediate1 min read

Reference-free evaluation for open-ended dialogue

ROUGE punishes valid paraphrases; use reference-free LLM-as-judge or learned scorers rating coherence, relevance, and groundedness.

intermediate1 min read

How MMLU works and the contamination problem

MMLU is multiple-choice across 57 subjects scored by accuracy; contamination means test items leaked into pretraining, inflating scores.

intermediate1 min read

How to evaluate a RAG system end to end

Measure retrieval (recall, precision, MRR, NDCG) and generation (faithfulness, answer relevance) separately, plus end-to-end correctness.

intermediate1 min read

How FID is calculated versus Inception Score

FID fits Gaussians to Inception features of real and fake images then measures Frechet distance; it uses real references and detects mode collapse.

intermediate1 min read

Aligning text and image representations

Contrastive learning like CLIP pulls matched image-text pairs together and pushes mismatches apart; alternatively projection layers map one modality into a frozen model's space.

intermediate1 min read

How Stable Diffusion generates images

The text encoder turns the prompt into embeddings, the U-Net predicts noise to remove conditioned on those embeddings, and the scheduler controls how noise is stepped down over iterations in…

intermediate1 min read

Designing a Visual Question Answering system

Encode the image with a vision backbone, encode the question with a text encoder, fuse them via cross-attention into a joint representation, then decode or classify the answer.

intermediate1 min read

Evaluating image generation: FID and IS

FID compares feature distributions of real and generated images, lower is better; Inception Score rewards confident, diverse classes but ignores real data.

intermediate1 min read

Evaluating a RAG system end to end

Measure retrieval with context recall or precision, and generation with faithfulness and answer relevance, attributing failures to the right stage.

intermediate1 min read

Reward models in RLHF and PPO

It learns from human preference comparisons to score responses, then supplies the reward signal that PPO maximizes while a KL penalty keeps the policy near the reference.

intermediate1 min read

Demographic Parity versus Equalized Odds in hiring

Demographic parity equalizes selection rates regardless of qualification; equalized odds equalizes true and false positive rates across groups, conditioning on the true label.

intermediate1 min read

Explain an interaction effect to a non-statistician

Define interaction as it depends on, show separate slope lines per age group, give the business takeaway on targeting.

intermediate1 min read

Present a small but significant A/B test lift

Hypothesis, design and validity checks, result with effect size and interval, business impact of 0.5%, then a clear recommendation.

intermediate1 min read

Interactive versus static plots for EDA

Interactive libraries win for exploring dense, high-cardinality, or multi-dimensional data via zoom, hover, and filtering; static plots win for reproducible, publication output.

intermediate1 min read

Parquet versus CSV for analytical data lakes

Parquet stores by column enabling projection pushdown, compression, and predicate skipping; CSV is row-based, untyped, and slow to scan.

intermediate1 min read

Audit an ML pipeline for GDPR compliance

Inventory data and check minimization, verify processing matches stated purpose, build lineage to trace any prediction's inputs.

intermediate1 min read

A/B test two fraud models in production

Randomize by entity, consider shadow mode first, collect precision/recall and business loss, decide with significance and guardrails.

intermediate1 min read

Communicate a forecast interval to an executive

Give the point estimate but frame the range as scenarios, use a fan chart, tie the interval to planning decisions and risk.

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