Start studying
Module 7 · Prompt Engineering Module contents
Module 7  ·  Card 4 / 17beginner

Context

Context is the background material the model needs to answer well.

It might be documents, prior decisions, data or examples.

The model only knows what is in its weights plus what you provide.

Delimiting context clearly with tags or headings improves reliability.

More context is not automatically better; irrelevant material dilutes attention.

Learn in depth ↓
Module 07 · Prompt Engineering · 17 concepts
In depth  /  15 lines

Context, in more detail

Context is the background material you supply so the model can answer well.

The model knows what is in its weights plus whatever you put in the prompt, and nothing else.

It cannot see your database, your previous conversations or the document you meant to attach.

Most bad answers are missing context rather than a weak model.

Documents, prior decisions, data, examples and definitions all count.

Mark it off clearly with tags or headings so instruction and material never blur.

Say what the material is and how it should be used, since a pasted wall of text is ambiguous.

More is not better, and irrelevant material measurably degrades the answer.

Attention is finite, so every irrelevant paragraph competes with the relevant one.

Position matters as well as volume, since the beginning and end are attended to most reliably.

That is why retrieval and reranking exist rather than pasting everything you own.

State explicitly what to do when the context does not contain the answer.

Without that instruction the model will fill the gap from its training data.

Retrieved context is untrusted input, since anything it contains may try to give instructions.

Keep it current, because stale context is followed just as obediently as fresh context.

Test yourself

One question on this card. Every option explains itself once you pick, right or wrong.

Question 1
Why is adding more context not automatically better?
Prompt Engineering

17 concepts in this module, then a graded test with every answer explained.

Study this module →
↑↓ move↵ openesc close