Short Definition
Positional encoding gives a transformer information about token order and position.
Intuition
Attention can compare tokens, but by itself it does not know which token came first. Positional information adds that ordering signal.
Technical Definition
Positional encoding injects absolute or relative position information into token representations or attention computations.
Example
Sinusoidal encodings add position-dependent vectors to token embeddings before attention layers.
Common Misunderstandings
There are many positional encoding methods, not only the original sinusoidal approach.
Position handling matters more as context length and sequence structure become important.