You said it matches text to its training data, which it does not do.
Your single-phrase statement only works for very short, non-repetitive phrases. As soon as your phrase repeats a token more than a few times, the statistics for the tokens change and could result in nonsensical output that repeats through subsections of the training data.
And even then for that single non-repetitive phrases, the reason you would get that single phrase back is not because it would be “matching on” the phrase. It is because the token weights would effectively encode that the statistical likelihood of the “next token” in the generated output is 100% for a given token when the evaluated token precedes it in the training phrase. Or in other words: Your training data being a single phrase maniplates the statistics so that the most likely output is that single phrase.
However, that is a far cry from simple “matching” against the training data. Which is what you said it does.
Analysis. It uses it, but not by “matching it”. The training data is not included in the final model. No GPT can access its training data at runtime.
Training analyzes the contents of the training data and creates a statistical model representing the likelihoods of various tokens based on a complex series of mathematical transformations that encode various attributes of the tokens making up the training data.
3Blue1Brown has a great series on the actual math behind it, I would highly recommend educating yourself on what GPTs actually do. It’s way more interesting than simple matching.
God forbid I use simpler language to describe what it does.
It’s pattern matching with extra steps.