Skip to content
tezvyn:

LLM

157 bites tagged LLM — interview questions with model answers, and 60-second explainers.

LLMs & Generative AI1 min read

The alignment tax and capability trade-offs

Alignment tax is capability lost from safety tuning, measured as benchmark or task-success deltas before and after; a product decision weighs over-refusal against harm risk. cost of safety interventions.

LLMs & Generative AI1 min read

Constitutional AI versus standard RLHF

A written principle set guides self-critique and revision, plus AI feedback (RLAIF) replaces human preference labels. alignment methods beyond human feedback. calling it just RLHF with extra steps or human-only labeling.

LLMs & Generative AI2 min read

Preventing PII in LLM outputs: curation, fine-tuning, or guardrails

Favor post-processing guardrails as the enforceable last line, backed by data curation; note each layer's tradeoffs and that defense-in-depth is best. Choosing the right layer for PII control.

LLMs & Generative AI2 min read

Red teaming a generative model

Deliberately probe for harmful outputs across categories, document jailbreaks, and automate with adversarial prompt generators plus classifier-based judging. Adversarial safety evaluation.

LLMs & Generative AI2 min read

Evaluating faithfulness and compositionality in multimodal models

Use targeted probes with hard negatives, attribute-relation binding tests, and structured grounding checks; note BLEU rewards surface overlap not correctness. Going beyond n-gram metrics.

LLMs & Generative AI2 min read

CLIP's contrastive objective and zero-shot classification

Train image and text encoders to align matched pairs and repel mismatched ones in a shared space; classify zero-shot by comparing an image to text prompts of class names. Contrastive vision-language pretraining.

LLMs & Generative AI2 min read

Handling a 401 error in an LLM agent's tool call

Catch the tool error, return a structured observation to the LLM, and distinguish recoverable retries from terminal failures needing re-plan or escalation. Robust agent error handling.

LLMs & Generative AI2 min read

Why chain-of-thought helps large models but not small ones

Small models lack reliable multi-step reasoning, so CoT just adds error-prone steps; adapt by using few-shot/fine-tuning or distillation for small tiers. Understanding emergent abilities and tier-aware prompting.

LLMs & Generative AI2 min read

Self-consistency over chain-of-thought

Sample multiple CoT paths at nonzero temperature and majority-vote the final answer; cost scales with the number of samples. Sampling-based reasoning improvement and its cost.

LLMs & Generative AI2 min read

Prompt engineering to curb extraction hallucinations

Ground strictly in source, allow null for missing fields, enforce a schema, and use few-shot examples; acknowledge prompting cannot fully eliminate it. Practical hallucination control plus honesty about limits.

LLMs & Generative AI2 min read

Fault-tolerant checkpointing for thousand-GPU pre-training

Checkpoint weights, optimizer state, RNG, and data position together; use asynchronous sharded writes and automated detect-restart-resume. Resilient large-scale training.

LLMs & Generative AI2 min read

Tokens and vocabulary-size tradeoffs

A token is a subword unit; larger vocab shortens sequences but bloats the embedding matrix, smaller vocab generalizes but lengthens sequences. Tokenization fundamentals.

LLMs & Generative AI1 min read

Cross-attention versus self-attention in encoder-decoder Transformers

Cross-attention draws Queries from the decoder and Keys/Values from the encoder, letting the decoder condition on the source. Information flow in encoder-decoder models.

LLMs & Generative AI1 min read

How Transformers encode token position

Attention is permutation-invariant, so positional encodings (sinusoidal, learned, or rotary) are added or applied. Why and how positional information is injected.

LLMs & Generative AI2 min read

Self-attention and the Query, Key, Value matrices

Queries score against keys via scaled dot product, softmax yields weights, and those weight the values into the output. Core Transformer mechanics. Confusing the three roles or omitting the scaling and softmax steps.

LLMs & Generative AI2 min read

Why RAG persists despite million-token context windows

Cost and latency scale with context, attention degrades in the middle, and RAG adds freshness, access control, and citations. RAG versus long-context tradeoffs. Assuming a huge window equals reliable use of all of it.

LLMs & Generative AI2 min read

Designing an autonomous research-and-report agent

Planner that decomposes goals, short-term scratchpad plus long-term vector memory, structured tool calls, and a reflect-retry loop for error correction. Agent architecture fundamentals.

LLMs & Generative AI1 min read

Data lineage and machine unlearning for a fine-tuned LLM

Version and fingerprint datasets, record transforms and which checkpoint saw what, and enable unlearning via retraining, data sharding, or approximate gradient methods. Auditable lineage plus practical unlearning.

LLMs & Generative AI1 min read

Practical explainability for an LLM loan summary

Use attribution-by-design with grounded citations, structured rationales, and a deterministic rules layer instead of slow per-token SHAP. Pragmatic LLM explainability under constraints.

LLMs & Generative AI1 min read

Measuring fairness in an embedding-based text classifier

Define group definitions, apply demographic parity and equalized odds, and address noisy labels and implicit group membership. Operationalizing fairness metrics on text.

LLMs & Generative AI1 min read

Preprocessing conversations to protect privacy before fine-tuning

Detect and redact PII with NER plus regex, choose redaction versus pseudonymization, and validate recall. Privacy-preserving data pipelines for training.

LLMs & Generative AI1 min read

Mitigating demographic bias in a fine-tuned chatbot

Curate or counterfactually augment training data to balance demographics, plus apply post-hoc guardrails or fairness-constrained fine-tuning. Practical bias mitigation across the ML lifecycle.

LLMs & Generative AI2 min read

Agent planning beyond a ReAct loop

ReAct adapts step by step but costs many calls, plan-then-execute drafts a full plan upfront for fewer calls but is brittle to surprises, hierarchical decomposition splits goals… trade-offs among reactive and planned agent strategies.

LLMs & Generative AI2 min read

Evaluating a multi-tool LLM agent

Measure end-to-end task success, plus trajectory quality like correct tool choice and arguments, efficiency via steps and cost, and robustness to errors and edge cases. evaluating multi-step, tool-using behavior.

Get LLM bites daily.

Five a day, five minutes, offline. With quizzes so it sticks.

Open testing — you’ll join as an early tester.