Skip to the workspace
Pebellslearn by building
Prompting and Context  ›  Lesson

Give the Right Context

Context 12 minAn assistant works only from what is in its context, so give it the relevant files, exact evidence, your rules and what you tried, and leave out noise and secrets.

vibe coding / Give the Right Context

Explore each scene at your own pace.

01 · The rule

The rule

Give the Right Context

Last week you and the assistant agreed that Kitty stores money as whole paise. Today, in a new conversation, it writes a function that uses floats. It is not being stubborn. That decision simply is not in front of it. An assistant works only from what is in its context: your prompt, the files it has been shown or has read, and the earlier messages in the current session.

The rule

Give the assistant what this task needs, and nothing it doesn't.

The assistant does not know your flatmates, your decisions from last week or the error on your screen unless they reach its context. Useful context usually comes in four kinds:

  • The relevant files. The function in question, its tests, and the table layout it reads. Not the whole project.
  • Exact evidence. The full error message or the exact wrong output, copied, not "it's broken".
  • Rules and decisions. "Money is whole paise." "No JavaScript framework." "Do not change the tests."
  • What you have tried. So it does not suggest the same thing again.

More is not always better. Unrelated files can distract the assistant and bury what matters. Old versions of a file, still sitting earlier in a long conversation, can mislead it. And some things must never go into context at all: real passwords, API keys and personal data. Share the error, not the secret.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.