
How LLM Instructions Work: Tokens, Messages, Roles, and Context
You tighten the system prompt. You add the word "always." You move the rule to the top. The model still ignores it, and you have no idea which part of the…
Read tutorialDesign prompts, examples, output contracts, and evaluations for reliable model behavior.
Tutorials
Explore the mechanisms, tradeoffs, and implementation patterns within this AI engineering track.

You tighten the system prompt. You add the word "always." You move the rule to the top. The model still ignores it, and you have no idea which part of the…
Read tutorial
The prompt worked on your laptop. In production, the same prompt returns a paragraph on Monday, a bulleted list on Tuesday, and a confident fabrication on…
Read tutorial
The demo works. The real inputs don't. Same prompt, same model, and suddenly the output is the wrong shape, the wrong label, or confidently on the wrong…
Read tutorial
A prompt that grew from three lines to thirty is not a better prompt. It is a prompt nobody has tested.
Read tutorial
A prompt that passed review, shipped, and then quietly broke a downstream consumer is not a prompt problem. It is a specification problem wearing a prompt…
Read tutorial
That failure breaks the "bad answer means bad instruction" reflex. Sometimes the instruction is fine, and the bottleneck sits somewhere else: the model…
Read tutorial
A user types three words into your assistant. The model returns a confident, well-formatted, entirely wrong answer to a question nobody asked. The user…
Read tutorial
The model gets the answer wrong, and it is not because it did not know something. It dropped a constraint. It merged two cases that should have stayed…
Read tutorial
The first sub-answer is wrong, and every later step inherits it with full confidence.
Read tutorial
Your few-shot set passes every happy-path test, then folds the moment a real input arrives with an extra clause, an unusual label, or a phrasing you did…
Read tutorial
A single greedy decode is right most of the time and wrong with total confidence the rest. The instinct is to sample more and let the answers vote. But…
Read tutorial
You ask the model to critique its own draft. It returns: "The response is clear and well-structured, but could be more specific." You ask it to revise. The…
Read tutorial
The demo works. You paste a gnarly task into one prompt—extract the entities, reconcile them against the schema, flag the contradictions, write the…
Read tutorial
The 2 a.m. page is almost always the same story. A pipeline that extracted clean JSON in the demo starts throwing parse errors in production, and the logs…
Read tutorial
A prompt is not a sentence you tune. It is a versioned artifact whose behavior is a distribution, and you cannot manage a distribution by reading three…
Read tutorial
A prompt is a spark, not an engine. The spark still matters — it just cannot carry the machine.
Read tutorial