Prompts, context, and tokens

Home Learn Prompts, context, and tokens

In short

A prompt is the instruction and input you give an AI system. Context is the information available to the model when it responds. A useful brief makes the goal, relevant material, boundaries, and desired output easy to inspect.

Why it matters

“Make this better” leaves a lot for an assistant to decide. You may want one paragraph clarified, while it rewrites the whole document. You may expect it to use an attached notice, while the application supplies only part of the conversation. Giving the task a clear shape helps you find out whether the response did the job you actually asked for.

How it works

The brief is more than a question

Context can include messages, examples, retrieved passages, attachments, and tool results. A tool result is information returned by a defined software operation. What reaches the model depends on how the application assembles those inputs. A file shown in the interface and material actually supplied for an answer aren’t always the same thing.

Models represent language in tokens: units that may be words, parts of words, or other text elements. A context window is the amount of represented information a model can use in a request. The exact capacity and counting method depend on the system. You don’t need to memorize a limit to write a clearer brief.

Build a brief in four parts

Start with the goal: what should the answer help someone do? Supply context: the relevant material, audience, and terms. State boundaries: what must stay unchanged, what shouldn’t be invented, and which actions are outside scope. Specify a format that makes the answer easy to check.

Examples can show the structure or level of detail you want. The Prompt Report surveys instruction and example techniques, while emphasizing that “prompt engineering” contains several different approaches. There isn’t a magic phrase that replaces the actual source material.

More text is not always better

Irrelevant or conflicting material can make the task harder to follow. The 2023 Lost in the Middle study tested retrieval and question-answering with long inputs. Answers became less reliable when useful information sat in the middle. A longer input alone didn’t fix that problem.

Keep source labels clear, remove distractions, and check which version is current. I’d also state the editing boundary directly: improve the named passage, preserve its facts and meaning, and list the changes.

Example

Illustrative example: this scenario is invented.

Nora is a nurse educator preparing a orientation handout. She wants its opening paragraph made easier to read, while the scheduling information stays untouched. Her brief includes the paragraph, the intended audience, and the approved schedule.

She asks for a replacement opening and a change list. That lets her compare the revision against the original without searching through a rewritten document. If the assistant changes a date or adds a new instruction, she can identify the boundary it crossed.

What it doesn’t mean

  • A longer prompt isn’t automatically more useful. Include information that helps the specific task.
  • Asking an assistant to act as an expert doesn’t establish expertise or accuracy.
  • Remembered chat history doesn’t guarantee every earlier detail reached this response. Check the source it used.

Try it

For about ten minutes, use this sample note: “Staff orientation meets Thursday at 5 p.m. Use the west entrance. Bring the printed agenda. Changes to the agenda require supervisor approval.”

First ask an assistant to improve it. Then give a narrower brief: explain it to a first-time visitor, keep every condition, add no promises, and list wording changes. Compare the responses against the note. Look especially for whether the approval condition stayed attached to agenda changes. The clearer brief should give you a clearer way to judge the answer.

Keep going

Sources

Share this page