Ch 1: Beyond the Chatbot - Anatomy of LLM
1. How Does AI ‘Think’? (Anatomy of LLM)
Behind services like ChatGPT and Claude that we use every day lies a massive probability map called a Large Language Model (LLM).
Next Token Prediction
The principle behind AI is surprisingly simple:
“Finding the most probable word (token) to follow a given context.”
For example, when given the sentence “Let’s go to the…”, the AI calculates the probability of the next word being beach, park, movies, etc. Models with trillions of parameters calculate these probabilities so sophisticatedly that they create sentences that feel natural to humans.
2. Tokens: The Unit of AI Language
AI does not read text by character or word, but breaks it down into units called Tokens.
- In English, on average, 1 word ≈ 1.3 tokens.
- This token efficiency varies across different languages and architectures.
3. Why Prompt Engineering Matters
AI is highly dependent on context.
- Vague Questions: Give AI too many probabilistic choices. The result becomes inconsistent or ambiguous.
- Structured Questions: Narrow down the AI’s probability map, forcing it to follow the exact path to the answer we want.
Today’s Lab Pick a question you previously asked an AI that yielded poor results. Re-ask it by adding a [Role], [Constraints], and [Output Format]. How does the AI’s response change?
Stay in the loop
Get the latest articles delivered to your inbox. No spam, unsubscribe anytime.
Subscribe →