The Attention Mechanism
How a model knows which earlier words matter for the one it is reading.
When you read "The cat sat on the mat because it was tired", you know "it" means the cat, because you looked back at the right word. Attention lets a model do the same. For each word, it scores how relevant every other word is, then builds that word's meaning mostly from the high scorers. Older models squeezed a whole sentence into one fixed summary and lost detail on long inputs. It is the core idea inside every Transformer, including ChatGPT.