Should You Add Context, Examples, or a Reference Format?

Diagnose why an AI result missed the mark, then add only the context, examples, or reference format that solves the specific gap.

When an AI result is almost right, do not immediately add more of everything. Diagnose the gap first. Add context when the system misunderstands the situation, examples when it misreads an abstract standard, and a reference format when the content is usable but the output shape is wrong. Change one input at a time so you can tell what helped.

You may already have provided a goal, source material, constraints, and a completion standard. The first result is still not what you expected. A common reaction is to add a long explanation, several files, and five examples at once. The second result changes, but you no longer know why.

The problem is often not a lack of information. It is a lack of the right kind of information. I recommend diagnosing the failure from the output instead of judging the prompt by its length.

OpenAI and Anthropic both support providing relevant context, concrete examples, and clear output requirements. The three-way diagnosis below—context for missing background, examples for missing judgment patterns, and a reference format for the desired output shape—is my teaching method. It is not an official shared classification from the two companies.

Add context when the result misunderstands the situation

Context is the background the model needs for this particular task. It is not your company’s entire history or every file in a project.

Suppose you ask AI to turn an event notice into an invitation. The result sounds like a formal announcement, but the event is an internal reading group for ten colleagues who know one another. The missing input is not a format. The model does not understand the audience, relationship, or use.

Add only the background that changes the result:

This message is for the same ten-person internal group.
Everyone knows one another.
The purpose is a reminder, not a formal announcement.
Use a direct, friendly tone. Do not introduce the company.

OpenAI’s Codex guidance emphasizes supplying the right context and relevant files so the system makes fewer assumptions. Anthropic also notes that explaining why a requirement matters can help the model understand the goal. OpenAI: Codex best practices Anthropic: Prompting best practices

Do not treat “possibly related” as “required.” If a piece of background would not change the content, judgment, or tone, leave it out for now.

Add examples when an abstract standard keeps being misread

“Make it professional,” “classify it clearly,” and “use our usual style” may be meaningful to you, but they allow many interpretations. A good example can be more useful than five extra adjectives.

Suppose you want customer messages classified as “reply needed,” “record only,” or “escalate to a manager,” but the model sends every complaint to a manager. Provide a few fictional examples with the correct category and a short reason:

“Can you reissue my invoice?”
→ Reply needed; the customer is asking for a process.

“The package arrived today. Thank you.”
→ Record only; there is no unresolved request.

“If the refund is not processed today, I will contact the regulator.”
→ Escalate to a manager; there is an explicit escalation risk.

Anthropic describes examples as a reliable way to steer format, tone, and structure. It also recommends examples that are relevant, varied, and clearly structured. Anthropic: Prompting best practices

This does not mean more examples are always better. A beginner can start with two or three fictional examples that are clearly different. If you cannot explain why an example belongs in a category, the AI will inherit your ambiguity.

Add a reference format when the content is usable but hard to use

A reference format does not give the AI facts. It defines fields, order, and level of detail.

If the AI correctly finds the event date, location, and preparation requirement but returns six paragraphs of prose, your problem is the output shape. Replace “make it more structured” with an explicit skeleton:

Use exactly this format. Do not add fields.

Event:
Time:
Location:
Reply deadline:
Preparation:
Information not provided by the source:

Clear output formats and constraints are supported by both OpenAI and Anthropic guidance. But formatting cannot repair a false fact. A wrong date does not become correct when placed in a clean table.

Treat the three inputs as repair tools, not a fixed recipe

Problem in the first resultAdd firstAvoid
It misunderstands the audience, purpose, or limitsContextPasting the entire project history
It repeatedly misreads an abstract standardA few clear examplesAdding only more adjectives
The content is usable but the structure is wrongA reference formatTreating a format problem as a fact problem
The underlying facts are wrongReturn to sources and reviewHiding the error with more style examples

The last row matters. Not every failure can be repaired through prompting. Anthropic’s prompt engineering overview asks users to define success criteria and empirical tests first, and explicitly notes that prompt changes are not the best solution to every failing evaluation. Anthropic: Prompt engineering overview

Practice: change one input and run again

Use a recent first draft from an AI system, or continue with the event-notice exercise.

Input improvement card

Original task:
What failed in the first result:
The gap is mainly: context / examples / reference format / not an input problem
The one input I added:
Why it is directly related to the gap:
What improved after the new run:
What still did not improve:

The second result does not need to be perfect. You are finished when you can explain the gap you observed, the one type of information you added, and what changed afterward.

If a gap remains, do not discard everything. The next lesson will turn the difference between the current result and the target into a precise revision request while protecting the parts that are already correct.

References