AI Engineering
/

LLM Foundations

LLM Foundations

Explain tokens, context windows, sampling, and hallucinations.

Start topic

Build an accurate model of how a large language model reads input and produces output. Covers tokens, context limits, sampling, and why fluent answers can still be wrong.

4 questions

Questions

Easy

Easy
Conceptual

1.5 h

Explain why a context window is not a word count, why a model does not remember earlier chats on its own, and why temperature zero does not make an answer true.

Medium

Medium
Hands-on

3 h

Work out why a model's answer looks cut off or incomplete by reading termination metadata, token budgets, and stream evidence before changing any setting.

Medium
Conceptual

3 h

Compare sending whole documents in a large context window with retrieving a few passages for two features of one product, using window fit, cost with prefix caching, latency, access, and a sliced pilot, and say what would change each choice.

Hard

Hard
System Design

4 h

Recommend a model or routing policy from measured quality, cost, and latency, say what evidence is still missing, and revise the decision when the traffic mix changes.

What you will be able to do

  • Explain how a model generates text one token at a time
  • Explain why token counts differ from word counts and between tokenizers
  • Budget a request's context, including the output reserve
  • Distinguish pretraining, inference, in-context learning, and fine-tuning
  • Explain why low temperature does not make an answer correct, and how to verify one
  • Build a token budget that includes message overhead and the output reserve
  • Separate model termination (output limit, stop sequence, tool call) from transport and rendering failures
  • Name the evidence that confirms each hypothesis before changing configuration
  • Explain why changing temperature does not fix truncated output

Before you start

Suggested, not required.

No prerequisites: a good place to start.

Related on CodeSnatch