Attention for “the cat sat”. Choose which word is asking. On the left, drag its query arrow; each allowed word’s key gets a score, the dot product with the query. Softmax turns the scores into weights. On the right, the output is the weighted average of the allowed words’ value points, so it always lands inside their triangle.

1 · Match: query vs. keys

2 · Mix: weighted average of values

Drag the amber query, or tap the plane. Point it at a key and that word wins. Drag it farther out and every score grows, so softmax snaps onto one word; untick “divide by √d” to see the same thing happen.