Self-attention allows each token position to combine information from positions in the same sequence. A learned projection produces three representations: a query asks what the current position seeks, a key describes how another position can match, and a value carries information to mix into the result. These names describe mathematical roles, not three literal database tables.
If hidden states H are shaped (T,d), multiplying by learned projection matrices creates Q,K,V. For one attention head, queries and keys must have the same comparison width. The score matrix Q@K.T has shape (T,T): row i contains the current query's scores against every key. Values can have a different output width, so their role is separate from matching.
With query [1,0], keys [1,0] and [0,1] have dot-product scores 1 and 0. A dot product multiplies corresponding coordinates and sums them. Similarity of these projected representations helps decide information flow; it does not provide a citation or prove the truth of a token.