Skip to content
Back to Blog
AI

What Happens When You Ask AI a Question?

5 min read

A student at an Avanza STEM AI workshop typing a question and reading the AI's response
What happens between your question and the AI's answer is more interesting than it looks. It is all about prompts, patterns, and prediction.

Typing a question into an AI feels like texting a very fast, very well-read robot. You send "why is the sky blue?" and a few seconds later there is a full explanation waiting. But what actually happened in that gap?

Nothing in there woke up and pondered your question. What happened was a process: prompt, training, patterns, prediction. Let's walk through it step by step.

Step 1: You Give AI a Prompt

The prompt is whatever you typed. It can be lazy, like "explain gravity," or it can actually give the AI something to work with, like "explain gravity to a 3rd grader using a playground example."

The second one gets a much better answer, because you told it who the answer is for and what to build it around. Think of a prompt like instructions to a teammate. Vague instructions, vague results.

Step 2: AI Breaks Down Your Words

The AI chops your prompt into pieces and looks at the words, the order they came in, and the shape they make together.

Say you ask for "photosynthesis explained for kids." It picks up three signals. "Explain" means you want teaching, not a list. "Photosynthesis" is the subject. "For kids" sets the reading level. Those three clues shape everything that comes next.

Step 3: AI Uses What It Learned During Training

Long before you showed up, that model went through training, which means it processed a staggering amount of text. Articles, questions, answers, explanations, stories, code, all of it.

It did not memorize any of that. It absorbed patterns instead. Which words travel together. How a good explanation is usually built. Which facts tend to show up side by side. What different writing styles feel like. Those patterns are what it reaches for when you ask something it has never seen.

Step 4: AI Predicts a Response

Now it starts writing, and it does it by predicting what should come next, piece by piece. There is no finished answer sitting in a drawer. Ask "why do plants need sunlight?" and it predicts that a solid answer probably involves energy, food, leaves, and photosynthesis, then builds toward that.

This is also why the same question can get you a one-liner, an essay, a poem, a quiz, or a numbered guide. You are steering the prediction.

Step 5: The Answer Appears

The text lands on your screen looking smooth and sure of itself. Hold onto how it got made.

That answer did not come from someone who lived through anything, opened a textbook, or weighed what actually matters here. It came from a tool assembling patterns. Sometimes that is exactly what you needed. Sometimes it needs a second look.

Why Clear Prompts Help

Sharper prompt, sharper answer. Every time. Swap "tell me about robots" for "explain the difference between robots and AI for a 4th grader, with examples." Swap "help with science" for "give me three science fair ideas about magnets using stuff I can find at home."

Give it a clear job and it will do a clear job.

Try This

Ask the same thing three ways and watch what changes:

  • Explain electricity.
  • Explain electricity using a water slide example.
  • Explain electricity in five sentences for a 3rd grader.

Line the three answers up next to each other. The topic never moved. Your prompt did all the work.

The Big Idea

You give a prompt. The AI reads it, leans on patterns from training, predicts what comes next, and builds an answer out of that. It looks like thinking. It is prediction. Which makes it powerful and also makes it fallible.

The AI can hand you a response. Understanding it is still your job. Stay curious, write better prompts, and check the answers that count.