Last updated

How AI Language Models Work

Definition: A large language model (LLM) is an AI trained on huge amounts of text. At its core it does one thing: predict the most likely next word, over and over, to build a response.

Why this matters for your prompts

Because the model predicts based on your words, the words you choose steer everything. Give it a rich, specific starting point and the most likely continuation is a rich, specific answer. Give it a thin one and you get a generic reply.

A few key ideas

  • Tokens — the model reads text in chunks called tokens (roughly word pieces). Both your prompt and its reply are made of tokens.
  • Context window — the model can only "see" a limited amount of text at once. Very long chats can push earlier details out of view.
  • No memory by default — unless a tool stores it, each new conversation starts fresh. The model does not remember you.
  • It can be confidently wrong — LLMs sometimes invent facts (called hallucination). Always verify important claims.

The takeaway

You are not searching a database of answers — you are guiding a prediction. That is why how you phrase a request changes the output so much, and why the rest of this course focuses on phrasing.

💡 Remember: clearer input leads to a more predictable, higher-quality output.

Ad · responsive