LLM Fundamentals & Output Behavior
How language models actually think — tokens, temperature, context, and system messages
Session Topics
What is a Language Model?
Statistical systems trained to predict the next token — and how that leads to apparent reasoning, knowledge, and creativity.
Tokens: The Unit of Computation
How tokenisation works (byte-pair encoding), why it matters for cost, context limits, and non-English languages.
Temperature & Randomness
Temperature=0 for deterministic outputs, higher values for creative exploration — practical settings for real tasks.
Context Window Limits
Working within 4K–128K token windows: managing conversation history, truncation strategies, and sliding context.
System Messages & Prompt Injection
How system prompts shape model behaviour — and why prompt injection is the #1 security concern in LLM applications.
Prompt Variations & Output Behaviour
Return to your Session 1 resume. Test the same profile with 3 different prompt phrasings and 1 temperature experiment. Observe concretely how small wording changes and parameter adjustments affect LLM output quality, consistency, and hallucination risk.
A comparison document showing 3 prompt variations and 1 temperature experiment with analysis.
Key Takeaways
- LLMs predict tokens — they don't 'know' or 'understand' in the human sense
- 1 token ≈ 0.75 words; cost and context limits are real engineering constraints
- Temperature controls the creativity-determinism trade-off
- System messages are the most powerful tool for shaping model behaviour