Skip to content

Learn · Track

Using AI models well

The habits that make a model call reliable: what to put in the prompt and the context, when examples help, which sampling settings to touch, and how to get output a program can parse. Each guide answers one question and shows it in code.

Guides in this track

Beginner4 guides, in reading order

  1. Prompt vs context engineering

    Prompt engineering words the instructions; context engineering chooses everything a model sees on a call. Assemble one under a token budget.

    6 min read

  2. Zero-shot vs few-shot

    Zero-shot gives a model only instructions; few-shot adds worked examples. Where examples fix format and edge cases, and what they cost in tokens and bias.

    6 min read

  3. Temperature vs top-p

    Temperature reshapes a model's next-token probabilities; top-p cuts off the unlikely tail. How both work, in code, and what each provider's API accepts.

    6 min read

  4. JSON mode vs structured outputs

    JSON mode promises valid JSON; structured outputs constrain the reply to your JSON Schema. What each provider guarantees, and why you still validate.

    7 min read

Before and after

Prerequisites: none; knowing what a language model is helps. After this track: Prompt injection starts the agent security track.

This website (not the L2M product) counts page views with GoatCounter, without cookies.