It's absolutely a knowledge base. The "training data" is its raw database which is then preprocessed to speed up the query engine. Then it does some additional processing to return amalgamated results from that database when presented with a query, which for some reason they call a "prompt." It's clever, but when you view the training data as part of the program source code, which it absolutely is, the information entropy of its output is miniscule.
- Google: How do I ...
- visit stack overflow
- copy/paste
- code generated.
There's more steps, but how is this different? Chat GPT though will go the extra mile and actually EXPLAIN what each bit does usually. It's not always accurate but neither is stackoverflow.