To understand how prompt engineering works in ChatGPT, first consider the structure of a story using ChatGPT. A story created using ChatGPT is made up of several prompts, or short sentences written by the user.