← Back to AI Knowledge Hub
AI Knowledge Hub · Article 7 ⚙️

How LLMs Work

LLMs do not think exactly like humans. They read your prompt, break text into small pieces, use context, and predict useful words step by step.

⚙️
Prompt
Tokens
Context
Answer

🤖 Quick Reading Guide

This article explains the basic working flow of LLMs: prompts, tokens, context, prediction, and human checking.

Tokens Context Prediction Answer Draft

1. Simple Definition

An LLM works by reading your text and predicting a useful answer based on patterns it learned during training.

It does not search its memory like a normal database. It generates an answer word by word based on your prompt and context.

LLM working idea: Read prompt → Understand pattern → Predict next useful words → Create answer.

2. What Are Tokens?

LLMs do not read text exactly like humans. They split text into small pieces called tokens.

A token can be a word, part of a word, punctuation, or symbol.

“Write a polite email” → Write / a / polite / email

When your prompt is long, the model has more tokens to read. That is why clear and focused prompts are important.

3. What is Context?

Context means the information you give to AI so it can understand your situation.

For example, “write an email” is too broad. But “write a polite follow-up email to a supplier about delayed delivery” gives useful context.

Better context = better answer.

4. Animated Process Flow: How an LLM Creates an Answer

No video needed. This flow shows the simple process from prompt to final answer.

⌨️
Prompt
You type a question, task, or instruction.
🔤
Tokens
The text is split into small language pieces.
📦
Context
The model uses your details to understand the task.
🧠
Prediction
It predicts useful words step by step.
Answer
You receive a draft answer to review.
Best Rule: Clear Context → Better Prediction → Better Draft

5. Why Prompt Quality Matters

The LLM uses your prompt as the main instruction. A weak prompt often gives a weak answer.

Weak Prompt

“Write report.” The model does not know the topic, audience, tone, or format.

Better Prompt

“Write a short weekly small shop stock update for team lead with 3 bullet points and professional tone.”

6. Common Misunderstanding

Many beginners think:

“LLM always knows the latest facts.”

This is not always true. Some LLMs do not have live internet access. Even with internet access, important facts should still be checked.

7. Myanmar-Friendly Example

Imagine you ask:

“Summarize our small shop weekly stock movement for team lead.”

The answer will be better if you include context:

8. Better Prompt Example

Instead of asking:

“Make summary.”

Ask:

“Create a short short report summary from this inventory data. Explain main change, possible reason, and next action. Use 3 bullet points, simple English, and professional tone.”

This gives the LLM clear context and output format.

9. How to Use This Knowledge

To get better LLM answers:

10. 3-Minute Summary

LLMs read your prompt as small text pieces called tokens.

They use the context you provide and predict useful words step by step.

They are powerful for writing, explaining, summarizing, and brainstorming.

Prompt → Tokens → Context → Prediction → Draft Answer → Human Review

The clearer your prompt, the better your result.

🎬 Optional Video to Watch

Watch this if you want a clearer idea of how LLMs predict and generate answers.

← Previous: What is an LLM? Back to AI Hub Next: Why Models Give Different Answers →