WriteMyAIPromptFree, no sign-up

Prompt structure

Prompt structure is the order and separation of a prompt’s parts — role, context, task, constraints, format, examples — which changes model behaviour independently of the words used.

Two ordering rules carry most of the benefit: put long reference material before the instructions, so the model reads the material before learning what to do with it; and restate the task at the end, because models weight the end of the context heavily.

Related terms

XML tags in prompts
XML tags in prompts are paired markers such as `<context>` and `</context>` used to label each section of a prompt so the model can tell them apart.
Recency bias
Recency bias is a model’s tendency to give more weight to instructions near the end of a prompt than to those buried earlier.
Lost in the middle
Lost in the middle is the observed effect that models recall information placed at the start or end of a long context more reliably than information in the middle.

More on prompt structure

See the full glossary, read the guides, or put it into practice in the prompt builder.