Skip to content
AI Skill Index

Decide what belongs in the context

Cuts a bloated prompt down to what actually informs the answer.

Author: Editorial
Sign in to save
My prompt has grown and I am no longer sure what is earning its place.

The task the model performs: [WHAT IT DOES]
What I currently pass it: [LIST EVERY PIECE — instructions, examples, documents, history]
Symptoms: [SLOW / EXPENSIVE / IGNORES INSTRUCTIONS / INCONSISTENT]

For each piece, tell me:
- **What it is for**, and whether the output would change without it.
- **Whether it is stable** across calls. Stable material belongs at the front where prompt caching can reach it; anything varying breaks the cache for everything after it.
- **Whether it conflicts** with another instruction.

Then: what to cut, what to move, and what to replace with retrieval rather than passing every time.

"Include it in case it helps" is the belief to challenge. Irrelevant context makes answers worse, not just more expensive — say where that is happening here.

Highlighted parts are placeholders. Replace them before you send.

Worked example

The input is invented for this page. The output shows what the prompt asks for with that input.

Example input (invented)

The task the model performs: Sorts incoming support emails for an online plant shop into one of six categories and writes a one-line summary of each.

What I currently pass it: In this order.

  1. A system prompt of 900 words. It opens with today's date and the name of the support agent on shift, then a paragraph of company history, the six categories with a definition each, and tone rules for replies.
  2. 25 example emails, each with its category.
  3. Our full returns policy, 1,400 words.
  4. The customer's previous 10 emails, when there are any.
  5. The new email.

Symptoms: Expensive and inconsistent. The same email can get a different category on two runs, and about 1 in 10 outputs come back with a drafted reply, which I never ask for.

Example output

Piece by piece

  • Date and agent name. They change every shift and sit at the top, so they break the cache for the rest of the system prompt and everything after it. Neither changes a category, unless one of your categories depends on dates, such as late deliveries [VERIFY].
  • Company history. Stable, and no label would change without it. Cut it.
  • The six definitions. Stable, and the part doing the work. Keep them.
  • Tone rules for replies. Stable, but they conflict with the task. You ask for a category and a summary, then explain how a reply should sound. That is the likely source of the drafted replies in 1 output in 10.
  • 25 examples. Stable, and the strongest lever on consistency. Check that all six categories appear in them [VERIFY]. A category with no example is where two runs will disagree.
  • Returns policy. Stable, and the largest piece. To label an email "return request", the model needs the definition, not the policy [VERIFY].
  • Previous 10 emails. Varies by customer. Ten emails can pull the label toward the customer's last complaint and away from this one. If the runs that disagree are mostly customers with a long history, this is irrelevant context making answers worse [VERIFY].
  • The new email. Varies, and belongs last, where it is.

What to do

  1. Cut the company history, the tone rules and the date and agent line.
  2. Order what is left as definitions, then examples, then anything that varies.
  3. Remove the returns policy.
  4. Replace the 10 previous emails with retrieval: the subject lines of the last three, passed only when the new email refers to an earlier one.
  5. Ask for one of the six category names, spelled as defined, plus the summary, and nothing else.
ShareXLinkedIn

3 of the 11 other prompts filed under Agents & prompting.

Memory & context guides

1 guide is filed under Memory & context, the same category as this prompt.

Cookies

We use only the cookies this site needs to work. Optional analytics helps us see which content is worth writing more of — nothing loads until you say yes.

Read the privacy policy