Skip to content
tezvyn:

LLMs & Generative AI

Large language models, chatbots, agents, prompt engineering

145 bites

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

Interview questions in LLMs & Generative AI, page 5

advanced1 min read

Core insight behind GPTQ and AWQ

Not all weights matter equally; GPTQ minimizes layer output error using second-order info, AWQ protects salient weight channels tied to large activations.

easy1 min read

Rule-based versus model-based LLM guardrails

A guardrail is a programmatic check constraining LLM I/O; rule-based uses regex or blocklists, model-based uses a classifier like a moderation model to detect harmful content.

intermediate2 min read

Detecting RAG hallucinations with a confidence score

Decompose the answer into claims, verify each against retrieved context with NLI or an LLM judge, aggregate into a faithfulness confidence score, and flag unsupported claims.

intermediate2 min read

Direct versus indirect injection and agent defenses

Direct injection comes from the user prompt; indirect hides in third-party data the agent ingests like web pages.

advanced1 min read

Differential privacy vs utility in LLM fine-tuning

Clipping plus calibrated noise per step, smaller epsilon means stronger privacy but degraded accuracy, tracking the privacy budget across epochs.

easy1 min read

Fine-tuning vs RAG for daily-updated docs

Choose RAG because docs change daily, embed and index chunks in a vector store, retrieve top matches and inject into the prompt.

easy1 min read

Closed API vs open-weight models for production

APIs offer top quality and zero ops but recurring per-token cost and data-sharing concerns, open weights give control, privacy, and tuning at the price of hosting and MLOps burden.

easy1 min read

Hugging Face Hub, transformers, and datasets

The Hub hosts models and data, transformers loads models and tokenizers and provides the Trainer, datasets streams and maps preprocessing.

intermediate1 min read

Mixture of Experts architecture and routing

Many expert FFNs per layer, a router picks top-k experts per token, only those compute so active params are far fewer than total.

intermediate1 min read

Designing a production LLM summarization eval

A representative gold set, quality via human or LLM-as-judge plus faithfulness checks, and operational metrics like p95 latency and cost per request.

intermediate1 min read

Multimodal video understanding architecture

Sample frames, encode them into visual tokens via a vision encoder and projector, concatenate with text tokens, let cross-attention fuse them.

advanced1 min read

Three techniques to cut LLM inference latency

Quantization shrinks weights with small accuracy risk, KV-cache plus continuous batching boost throughput, speculative decoding drafts tokens for lossless speedup.

intermediate2 min read

LSTM vs GRU gating and trade-offs

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.

intermediate1 min read

Static vs contextual word embeddings

Static embeddings give one fixed vector per word ignoring context, contextual ones vary by sentence and resolve polysemy at higher compute cost.

intermediate1 min read

Encoder, decoder, and encoder-decoder Transformers

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…

intermediate1 min read

Fixing a prompt that ignores key constraints

Move the critical constraint to a prominent position, state it positively and specifically, separate instructions from data with delimiters, and add a concrete example.

intermediate2 min read

Diagnosing sycophancy from RLHF

Annotators reward agreeable, inoffensive answers so the reward model learns to favor them, fix by diversifying labelers, rewarding factual correctness over agreeableness, and…

intermediate1 min read

When to choose RAG over fine-tuning

RAG for fresh, factual, citable knowledge that changes often, fine-tuning for behavior, style, or format the model must internalize.

intermediate2 min read

Chunking and embedding a RAG corpus

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.

intermediate2 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.

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