SKILLUMEN
Try for free
Interview Questions  ›   The fundamentals

Attention

6 interview questions you should be able to answer.
3 worked answers   •   3 practice questions   •   Foundations
Every word looks
at every other.
  In one step.↘
Updated Sep 2026
01 CORE
1 / 6

In plain terms, what does self-attention let each token do?

Think about your answer before revealing.
Give it a try!
Interview answer
◷  ~ 25 seconds

Self-attention lets every token glance at all the other tokens in the sequence and pull in meaning from the ones most relevant to it, in a single step. Instead of reading a word in isolation, the model rebuilds each token's vector as a blend of the words it cares about, so “it” can absorb the meaning of “cat” however far back it sits.

That context-mixing is the core trick behind the transformer.

“it” pulls meaning from “cat” The cat sat so it
What the interviewer is testing
⊞
Every tokensees all others
⇄
One stepany distance
≋
Blendweighted mix
Follow-up they may ask
02 MECHANISM
2 / 6

Walk through the three steps, scoring, softmax, and mixing,
that produce a token's new vector.

Think about your answer before revealing.
Interview answer
◷  ~ 30 seconds

Three steps. Score: compare the token's Query against every token's Key with a dot product, then divide by the square root of the vector size so the numbers don't blow up.

Softmax: push those scores through softmax so they become weights that add up to 1, a clean distribution over how much to attend to each word.

Mix: take a weighted sum of everyone's Values using those weights. The result is a fresh, context-aware vector for the token.

3 STEPS
SCORE
Query · Key, ÷ √(vector size)
SOFTMAX
scores become weights
that sum to 1
MIX
weighted sum of the Values
03 DEEPER
3 / 6

What are the Query, Key, and Value roles,
and how are they made from a token's vector?

Think about your answer before revealing.
Interview answer
◷  ~ 30 seconds

Each is a small vector made by multiplying the token's embedding by its own learned matrix (Wq, Wk, Wv). The Query is what the token is looking for.

The Key is what it offers, the name-tag matched against other tokens' Queries. The Value is the actual information it hands over if it's chosen.

Queries are matched to Keys to decide the weights, and the Values are what actually get blended.

token vector × Wq × Wk × Wv Query what am I looking for? Key what do I offer? Value the info I hand over
More questions
04Why does attention handle long-distance relationships better than older RNN models?
05Why do models run several attention heads at once instead of just one?
06What's the main cost of attention, and how do people tame it?
These run inside Skillumen with graded answers.

This is a small sample.
600+ interview questions live inside Skillumen.

Every concept card carries its own interview questions, graded as you answer.
Free to start.

See more interview questions