← Generative AI and LLMs
Lesson 1 of 4
LLM basics
Watch, read the card, then practise. Tokens and context · Sampling and temperature
The video for this lesson is being recorded.
Meanwhile, the notes below and the 60-second cards cover the same ideas.
Practise this topicTokens and context
LLMs read and write tokens, and can only see a limited number at once: the context window.
Remember: Long documents must fit in the window, or be retrieved in pieces.
Sampling and temperature
An LLM picks each next token by sampling from probabilities. Temperature controls how adventurous that is.
Remember: Facts and formats → low temperature.
Try the example in Code Lab
window, prompt = 8000, 6500 print(window - prompt, round(750 / 0.75))