AI trains on data and creates an "embedding" which is a place to look for AI insights. In ChatGPT the AI searches the embedding for sentences that are responsive to the sentence that is input (the question).