ChatGPT uses a process called next-token prediction. It analyzes a user’s prompt and calculates the statistically most probable next word or fragment based on patterns in its training data. This cycle repeats sequentially until a complete response is formed