Skip to content
tezvyn:

🤖AI & ML

Artificial intelligence, machine learning, and data science

1166 bites

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

Everything in AI & ML, page 6

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.

advanced1 min read

Designing an agent that resolves ambiguity

Detect ambiguity, gather evidence with the contact API, resolve relative time deterministically, ask the user only when genuinely uncertain, then confirm before the irreversible booking.

advanced1 min read

Securing tool-using LLM agents

Name indirect prompt injection, data exfiltration, and unsafe tool execution, then defend with sandboxing, least-privilege scoped tools, input/output filtering, and human-in-the-loop on risky actions.

advanced1 min read

Hybrid search and re-ranking for retrieval

Hybrid search fuses dense semantic and sparse keyword signals to catch exact terms dense misses; a cross-encoder re-ranker rescoring top-k boosts precision.

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.

advanced1 min read

Direct Preference Optimization explained

DPO reparameterizes the RLHF reward in terms of the policy itself, turning alignment into a simple classification loss on preference pairs with no separate reward model or PPO.

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.

easy1 min read

Pre-training versus fine-tuning an LLM

Pre-training is broad self-supervised next-token prediction on huge corpora at massive cost; fine-tuning adapts on small labeled data cheaply.

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.

intermediate1 min read

Purpose of watermarks in Spark Structured Streaming

A watermark sets a threshold on event-time lateness, lets late data update windows up to that bound, and tells Spark when to finalize and drop old state.

intermediate1 min read

repartition() versus coalesce() in Spark

Repartition does a full shuffle and can increase or balance partitions; coalesce avoids a full shuffle and only reduces them.

intermediate1 min read

Explain a loan denial with LIME or SHAP

LIME fits a local surrogate, SHAP attributes the prediction across features via Shapley values, both give per-feature contributions.

intermediate1 min read

Design an automated A/B test reporting system

Standardized metric definitions, automated stats with confidence intervals and guardrails, segment breakdowns, a clear ship recommendation.

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