What happens when you type in a prompt?

1–2 minutes

Learn about the inner workings of embedding and tokens. This is part 3 of a 6-part mini essay base. It is written in a simple language to help non-technical users get started on AI and Prompt Engineering.

It might feel like magic when AI responds to your prompt. But behind the scenes, there’s a lot going on. Let’s break it down into simple steps:

  1. Input Reading: The AI reads the words you write in the prompt. It tries to understand what you’re asking.Example: If you say, “Write a story about a dragon,” it recognises key words like “story” and “dragon.”
  2. Context Matching: The AI looks at its “training data”—millions of examples it has learned from, such as books, websites, and conversations. It uses these examples to guess what kind of response you want.
  3. Generating a Response: The AI uses probabilities to decide the most logical next word for the response. For instance, if you ask about dragons, it knows “fire-breathing” or “mythical” often comes next.
  4. Refining Output: The AI refines the response to ensure it’s logical and aligns with your input.

In essence, AI doesn’t “think” like humans; it predicts the best possible answer based on patterns. Your prompt is the key to guiding it.

If you’d like to explore this topic a bit more, we recommend reading this excellent visual story on FT here.