Back to course syllabus
Make AI answers reliable enough to useLesson 1 of 6

Map the context before rewriting the prompt

Separate instructions, source material, examples, history, tools, and output rules to see what the model actually receives.

LESSON OUTPUT · context mapUPDATED · Sep 8, 2026
COURSE PROGRESS0 / 6
HOW TO USE THIS LESSON

Read with one real task in mind, then complete the workbench. The lesson is done when another person can review what you made.

When an answer is wrong, teams often rewrite the sentence nearest to the model. The real defect may sit earlier: an old document was retrieved, a system rule conflicts with the user request, an example teaches the wrong format, or a tool result never reached the final step.

Draw six lanes

Map the information flowing into one model call across six lanes:

  1. System instructions: durable rules and role boundaries.
  2. Task request: what the user wants now.
  3. Source material: facts the answer may rely on.
  4. Examples: demonstrations of acceptable behavior.
  5. History and state: decisions or facts carried from earlier steps.
  6. Tools and output rules: actions available and the required response shape.

For every item, name its owner, freshness, maximum size, and the signal that tells you it is missing or wrong.

Map order as well as presence

Two workflows can contain the same facts and behave differently because one buries the important constraint behind a long transcript. Mark which items are stable, which are selected at runtime, and which may be trimmed when the context grows.

The map should show the final assembled input, not only the databases and prompts stored around it.

Example: internal policy assistant

The system instruction says answers must quote an approved policy. The task request asks about travel reimbursement. Source material contains a current policy and an obsolete FAQ. History contains a previous question about a different country.

The map makes three fixes visible: exclude the obsolete FAQ, filter by jurisdiction, and keep the previous answer from becoming evidence. Rewriting “please be accurate” would not repair any of them.

Example: sales follow-up draft

The user asks for a concise follow-up. CRM notes contain the customer’s stated priority, while the call transcript includes exploratory ideas that were never promised. An example email teaches a confident tone but hides uncertainty.

The context map separates commitments from possibilities and gives each a different output label. The useful change is source classification, not a longer writing prompt.

Inspect the handoffs

Place a checkpoint wherever context changes form: search result to excerpt, tool output to state, state to prompt, or response to action. Record what can be dropped, duplicated, or misordered at that boundary.

Reconstruct what the model saw for one failed case

Freeze one repeatable failure and preserve the system rules, user request, retrieved passages, tool results, history summary, output constraint, and configuration version from that run. Do not infer runtime context from a prompt template in the repository. Inspect the final request and every trim, merge, or transformation immediately before and after it.

Document six questions for each context item:

CheckWhat to recordFailure signal
OriginSystem, document, or person that supplied itThe answer has no explainable basis
SelectionRule that admitted it to this callIrrelevant or unauthorized material appears
PrecedenceWhich item wins when information conflictsAn old rule overrides the current task
Position and sizePlacement and maximum budgetA critical constraint is trimmed or buried
FreshnessVersion, effective date, and update timeThe answer uses a superseded fact
OwnerPerson able to correct or remove itA known defect has no repair path

Debug facts first: confirm that correct evidence entered, inspect conflicting rules and examples, and adjust wording last. Change one lane at a time and rerun the same failure plus several regression cases. Replacing sources, rewriting the prompt, and switching the model together may improve output while hiding the actual repair.

A context budget is not a target to fill. Protect the task, boundary, and current evidence first, then decide how much history and demonstration material survives. Compress stable rules into a short structure and reduce long tool results to task-required fields. Every summary should name what it may omit and preserve a route to the original source.

Common questions about longer context

How is a context window different from a context map?

The window is the capacity available to one model call. The map describes which information actually entered, in what order, from which source, and under whose ownership. A large window does not make selection correct or prevent stale documents, conflicting rules, and irrelevant history from degrading the answer.

How many examples belong in context?

Keep examples that clarify a consequential behavior, boundary, or format distinction. Several near-duplicates consume space and can turn accidental wording into an apparent rule. State what each example teaches and include a contrasting case to confirm that the model is not copying mechanically.

When should a long conversation become a new task?

Start new task state when the goal, evidence scope, or permission changes, or when the history summary can no longer show which decisions remain valid. Move durable decisions into sourced, explicit fields rather than asking the model to infer them from an ever-growing transcript.

Boundary

A context map does not solve model capability limits. If the required reasoning remains unreliable when correct, compact evidence is present, test a different method or narrow the task. Do not keep adding context to compensate for a job the system cannot perform consistently.

SOURCES CHECKED

Which first-party sources informed this guide?

Sources anchor definitions, risk boundaries, or operational facts. The decision framework and workbench are original to AI Vista.

  1. Anthropic Prompt Engineering overviewChecked 2026-09-09
  2. OpenAI Prompt Engineering guideChecked 2026-09-09

TAKEAWAY TOOL

Context inventory and flow

Expose what enters the model and where it came from.

context / map
USE THIS WHENBefore asking someone else to run the work
YOU WILL GETA fillable, handoff-ready, reviewable artifact
HOW TO USE01—03
  1. 01
    Name the real taskDescribe the result to deliver, not an abstract goal.
  2. 02
    Fill the decision fieldsMake inputs, risk, evidence, and handoff explicit.
  3. 03
    Ask a colleague to reviewThe tool is ready when someone else can restate the decision.
DONE WHENFields are complete, boundaries are clear, and the result is reviewable.
Edits save automatically

LESSON READ

Finish the workbench, then mark it read.

The read state updates the syllabus and your course progress.

  1. 01Fields filled
  2. 02Case tested
  3. 03Reviewable

ARTICLE DISCUSSION

Leave a judgment another reader can reuse.

Record what worked, which boundary failed, or one question still worth pursuing.

DISCUSSINGMap the context before rewriting the promptOpen the community →
2 discussionsINSIGHTS · QUESTIONS · IDEAS
MC
Maya ChenProduct designer
INSIGHTContext map

Our support-summary prompt kept drifting, so I mapped instructions, ticket history, policy excerpts, and output rules separately. The missing piece was not wording: the model never received the latest refund exception. That map saved us another round of prompt polishing.

ARTICLE DISCUSSION18 helpful
GL
Grace LiuBrand strategist
INSIGHTSource flow

Separating source material from conversation history was the useful move for me. Our team had been calling both ‘context,’ which hid the fact that approved brand claims and a user’s earlier guesses were entering the model through different trust paths.

ARTICLE DISCUSSION8 helpful