Index

Module 04 · AIThe string and the contract

Prompt Engineering (shaping the next-token distribution)

Prompt Engineering
Prompt Engineering · Open board

Building with LLMs. What the Model Sees (one string, every turn, from the top) showed the returns desk sending the model one long string every turn, its first 1,200 tokens fixed instructions. This board cracks that segment open: the same customer question scored under three versions of those instructions, the 1,200 tokens broken into six labeled pieces, six versions measured for correctness and speed, and six popular tricks that turn out to move nothing.

Before you start. What the Model Sees (one string, every turn, from the top) built the string the desk sends every turn: the whole conversation flattened into one long piece of text, then cut into tokens. To choose the next token the model puts a score on every token it knows and picks the top one, and attention (Attention & the Transformer) is what lets it look back over the earlier tokens to work that score out. The model is paid per word it reads and per word it writes, and writing is the slow part. When it cannot answer from the string alone it asks the harness, the ordinary code wrapped around the model that sends the prompt and runs whatever the model asks for, to look something up first, and that request is a tool call.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Review AI →

Saved in this browser, and to your account when you sign in.