tezvyn:

🤖AI & ML

Artificial intelligence, machine learning, and data science

1166 bites

More in AI & ML — page 6

LLMs & Generative AI80 sec read

Evaluating image generation: FID and IS

WHAT IT TESTS: knowledge of generative image metrics. OUTLINE: FID compares feature distributions of real and generated images, lower is better; Inception Score rewards confident, diverse classes but ignores real data.

LLMs & Generative AI87 sec read

Designing an agent that resolves ambiguity

WHAT IT TESTS: agent design for under-specified requests. OUTLINE: 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.

LLMs & Generative AI82 sec read

Securing tool-using LLM agents

WHAT IT TESTS: threat modeling for agentic LLMs. OUTLINE: 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.

LLMs & Generative AI78 sec read

Hybrid search and re-ranking for retrieval

WHAT IT TESTS: knowledge of retrieval beyond plain vectors. OUTLINE: 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.

LLMs & Generative AI78 sec read

Evaluating a RAG system end to end

WHAT IT TESTS: ability to separate retrieval and generation quality. OUTLINE: measure retrieval with context recall or precision, and generation with faithfulness and answer relevance, attributing failures to the right stage.

LLMs & Generative AI85 sec read

Direct Preference Optimization explained

WHAT IT TESTS: understanding of DPO versus RLHF. OUTLINE: 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.

LLMs & Generative AI81 sec read

Reward models in RLHF and PPO

WHAT IT TESTS: understanding of the reward model in RLHF. OUTLINE: 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.

LLMs & Generative AI79 sec read

Pre-training versus fine-tuning an LLM

WHAT IT TESTS: grasp of the two-stage LLM training lifecycle. OUTLINE: pre-training is broad self-supervised next-token prediction on huge corpora at massive cost; fine-tuning adapts on small labeled data cheaply.

Data Science & Analytics88 sec read

Demographic Parity versus Equalized Odds in hiring

WHAT IT TESTS: understanding fairness definitions. OUTLINE: demographic parity equalizes selection rates regardless of qualification; equalized odds equalizes true and false positive rates across groups, conditioning on the true label.

Data Science & Analytics83 sec read

Explain an interaction effect to a non-statistician

WHAT IT TESTS: communicating interaction effects plainly. OUTLINE: define interaction as it depends on, show separate slope lines per age group, give the business takeaway on targeting.

Data Science & Analytics83 sec read

Present a small but significant A/B test lift

WHAT IT TESTS: structuring an experiment narrative. OUTLINE: hypothesis, design and validity checks, result with effect size and interval, business impact of 0.5%, then a clear recommendation.

Data Science & Analytics83 sec read

Interactive versus static plots for EDA

WHAT IT TESTS: matching viz tooling to the task. OUTLINE: interactive libraries win for exploring dense, high-cardinality, or multi-dimensional data via zoom, hover, and filtering; static plots win for reproducible, publication output.

Data Science & Analytics81 sec read

Parquet versus CSV for analytical data lakes

WHAT IT TESTS: columnar versus row storage trade-offs. OUTLINE: Parquet stores by column enabling projection pushdown, compression, and predicate skipping; CSV is row-based, untyped, and slow to scan.

Data Science & Analytics80 sec read

Audit an ML pipeline for GDPR compliance

WHAT IT TESTS: applying GDPR principles technically. OUTLINE: inventory data and check minimization, verify processing matches stated purpose, build lineage to trace any prediction's inputs.

Data Science & Analytics82 sec read

A/B test two fraud models in production

WHAT IT TESTS: production model experimentation design. OUTLINE: randomize by entity, consider shadow mode first, collect precision/recall and business loss, decide with significance and guardrails.

Data Science & Analytics89 sec read

Communicate a forecast interval to an executive

WHAT IT TESTS: communicating uncertainty to leadership. OUTLINE: give the point estimate but frame the range as scenarios, use a fan chart, tie the interval to planning decisions and risk. RED FLAG: presenting $10M as a guaranteed single number with no range.

Data Science & Analytics84 sec read

Purpose of watermarks in Spark Structured Streaming

WHAT IT TESTS: streaming state management. OUTLINE: 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. RED FLAG: confusing event time with processing time.

Data Science & Analytics82 sec read

repartition() versus coalesce() in Spark

WHAT IT TESTS: Spark partition control. OUTLINE: repartition does a full shuffle and can increase or balance partitions; coalesce avoids a full shuffle and only reduces them. RED FLAG: thinking coalesce can increase partitions or always beats repartition.

Data Science & Analytics76 sec read

Explain a loan denial with LIME or SHAP

WHAT IT TESTS: local explainability and its limits. OUTLINE: LIME fits a local surrogate, SHAP attributes the prediction across features via Shapley values, both give per-feature contributions.

Data Science & Analytics74 sec read

Design an automated A/B test reporting system

WHAT IT TESTS: scalable experiment reporting design. OUTLINE: standardized metric definitions, automated stats with confidence intervals and guardrails, segment breakdowns, a clear ship recommendation.