tezvyn:

LLMs & Generative AI

Large language models, chatbots, agents, prompt engineering

324 bites

LLMs & Generative AI2 min read

Designing an autonomous research-and-report agent

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

LLMs & Generative AI89 sec read

Data lineage and machine unlearning for a fine-tuned LLM

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

LLMs & Generative AI86 sec read

Practical explainability for an LLM loan summary

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

LLMs & Generative AI84 sec read

Measuring fairness in an embedding-based text classifier

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

LLMs & Generative AI85 sec read

Preprocessing conversations to protect privacy before fine-tuning

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

LLMs & Generative AI85 sec read

Mitigating demographic bias in a fine-tuned chatbot

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

LLMs & Generative AI2 min read

Handling outlier activations in INT8 quantization

WHAT IT TESTS: why INT8 quantization fails and how to fix it. OUTLINE: profile activation magnitudes to find a few large-magnitude outlier channels, then keep those in higher precision while quantizing the rest, a mixed-precision decomposition.

LLMs & Generative AI2 min read

Dynamic batching and the throughput-latency trade-off

WHAT IT TESTS: how batching balances GPU efficiency and latency. OUTLINE: the server groups concurrent requests into one batch to use the GPU fully, but larger batches and waiting to fill them raise per-request latency and time to first token.

LLMs & Generative AI2 min read

Detecting catastrophic forgetting in continual fine-tuning

WHAT IT TESTS: guarding original skills during continual training. OUTLINE: maintain a frozen held-out benchmark of original capabilities, evaluate after every fine-tune, track per-capability deltas, and alert on regressions.

LLMs & Generative AI2 min read

Agent planning beyond a ReAct loop

WHAT IT TESTS: trade-offs among reactive and planned agent strategies. OUTLINE: 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…

LLMs & Generative AI2 min read

Evaluating a multi-tool LLM agent

WHAT IT TESTS: evaluating multi-step, tool-using behavior. OUTLINE: 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.

LLMs & Generative AI2 min read

Chunking and embedding a RAG corpus

WHAT IT TESTS: practical RAG ingestion judgment. OUTLINE: choose chunk size and overlap balancing context vs precision, prefer semantic boundaries, then pick an embedding model matching domain and dimension, and store with metadata.

LLMs & Generative AI2 min read

When to choose RAG over fine-tuning

WHAT IT TESTS: matching technique to the kind of adaptation needed. OUTLINE: RAG for fresh, factual, citable knowledge that changes often, fine-tuning for behavior, style, or format the model must internalize.

LLMs & Generative AI2 min read

Diagnosing sycophancy from RLHF

WHAT IT TESTS: understanding how reward modeling induces sycophancy. OUTLINE: annotators reward agreeable, inoffensive answers so the reward model learns to favor them, fix by diversifying labelers, rewarding factual correctness over agreeableness, and…

LLMs & Generative AI89 sec read

Fixing a prompt that ignores key constraints

WHAT IT TESTS: practical prompt-engineering instincts. OUTLINE: move the critical constraint to a prominent position, state it positively and specifically, separate instructions from data with delimiters, and add a concrete example.

LLMs & Generative AI83 sec read

Encoder, decoder, and encoder-decoder Transformers

WHAT IT TESTS: mapping architecture to objective and use case. OUTLINE: encoder-only uses bidirectional masked-token pretraining for understanding tasks, decoder-only uses causal next-token prediction for generation, encoder-decoder uses span corruption for…

LLMs & Generative AI88 sec read

Static vs contextual word embeddings

WHAT IT TESTS: knowing how embeddings handle word sense. OUTLINE: static embeddings give one fixed vector per word ignoring context, contextual ones vary by sentence and resolve polysemy at higher compute cost.

LLMs & Generative AI2 min read

LSTM vs GRU gating and trade-offs

WHAT IT TESTS: understanding recurrent gating mechanisms. OUTLINE: LSTM has three gates and a separate cell state, GRU merges gates and state into two, so GRU is lighter and faster while LSTM may model long dependencies better.

LLMs & Generative AI84 sec read

Three techniques to cut LLM inference latency

WHAT IT TESTS: knowledge of software-level inference optimization. OUTLINE: quantization shrinks weights with small accuracy risk, KV-cache plus continuous batching boost throughput, speculative decoding drafts tokens for lossless speedup.

LLMs & Generative AI88 sec read

Multimodal video understanding architecture

WHAT IT TESTS: how vision and text fuse in multimodal models. OUTLINE: sample frames, encode them into visual tokens via a vision encoder and projector, concatenate with text tokens, let cross-attention fuse them.