The 60-second answer
Tokenization converts text into token IDs; embedding tables map IDs to dense vectors and positional information encodes order. Self-attention projects Q/K/V, computes softmax(QKᵀ/√d), applies masks, and mixes V; multi-head attention repeats this in learned subspaces.
Build the answer in this order
Tokenization converts text into token IDs; embedding tables map IDs to dense vectors and positional information encodes order.
Self-attention projects Q/K/V, computes softmax(QKᵀ/√d), applies masks, and mixes V; multi-head attention repeats this in learned subspaces.
BERT is an encoder-only Transformer that produces bidirectional contextual representations and was originally pretrained with masked-language modeling.
Connect the components to concrete use cases such as classification, retrieval, or token labeling instead of reciting definitions.
A useful interview mental model
This is the shape of a strong answer—not a script to memorize.
Senior-level signal
- Discuss subword fragmentation, O(n²) attention cost, and padding/attention-mask semantics.
- Distinguish token embeddings from retrieval embeddings and encoder-only models from decoder-only generation.
What the interviewer is really testing
Likely follow-up questions
Common weak-answer patterns
- Reciting a definition without mechanism or assumptions.
- Claiming one technique is always better without a data regime.
- Stopping before failure modes, validation, or deployment implications.