AGENCYSCRIPT
CoursesEnterpriseBlog
đź‘‘FoundersSign inJoin Waitlist
AGENCYSCRIPT

Governed Certification Framework

The operating system for AI-enabled agency building. Certify judgment under constraint. Standards over scale. Governance over shortcuts.

Stay informed

Governance updates, certification insights, and industry standards.

Products

  • Platform
  • Certification
  • Launch Program
  • Vault
  • The Book

Certification

  • Foundation (AS-F)
  • Operator (AS-O)
  • Architect (AS-A)
  • Principal (AS-P)

Resources

  • Blog
  • Verify Credential
  • Enterprise
  • Partners
  • Pricing

Company

  • About
  • Contact
  • Careers
  • Press
© 2026 Agency Script, Inc.·
Privacy PolicyTerms of ServiceCertification AgreementSecurity

Standards over scale. Judgment over volume. Governance over shortcuts.

On This Page

Step One: Locate the Exact AmbiguityFind the divergenceWhat this step producesStep Two: Collect Real Failure ExamplesHarvest actual wrong outputsWhat to keepStep Three: Write the Positive ExampleMake the positive a near-twin of the negativeQuality checksStep Four: Isolate a Single VariableStrip out incidental differencesHow to enforce isolationStep Five: Assemble the Contrastive PromptStructure for clarityA reusable skeletonStep Six: Validate on Held-Out InputsConfirm generalizationWhat to watch forStep Seven: Iterate or LockThe exit criterionDocumentation to keepA Full Pass on One ExampleThe caseThe passHandling Stubborn AmbiguitiesWhen one pair is not enoughThe disciplined extensionFrequently Asked QuestionsWhat if I cannot articulate the ambiguity in one sentence?Should the positive and negative use the same input?How many contrastive pairs should the final prompt have?My fix worked on the examples but not on new inputs. What went wrong?How do I tell overcorrection from a correct fix?Do I need to keep the held-out inputs after locking the prompt?Key Takeaways
Home/Blog/Building a Contrastive Prompt One Boundary at a Time
General

Building a Contrastive Prompt One Boundary at a Time

A

Agency Script Editorial

Editorial Team

·April 26, 2020·8 min read
contrastive prompting for disambiguationcontrastive prompting for disambiguation how tocontrastive prompting for disambiguation guideprompt engineering

Understanding why contrast works is one thing; sitting down and actually building a contrastive prompt that resolves a specific ambiguity is another. This article is the second kind: a do-this-then-that process you can follow today on a prompt that is currently giving you defensible-but-wrong outputs. Each step produces something concrete, and the steps are ordered so that earlier ones feed the later ones.

The process is deliberately sequential because the most common mistake is jumping straight to writing examples before identifying what the ambiguity actually is. If you do not know precisely which interpretation you are trying to rule out, your examples will vary in too many ways and teach the model the wrong lesson. We will start by pinning down the ambiguity, then build the contrast around it.

Work through this with a real prompt of your own open in front of you. The steps assume you have an instruction that produces output you do not want, and that the wrongness comes from the model interpreting your intent differently than you meant it.

Step One: Locate the Exact Ambiguity

You cannot resolve what you have not named.

Find the divergence

Run your current prompt several times and look at the outputs that are wrong. Then articulate, in one sentence, the specific interpretation the model is choosing that you did not intend. "It is treating professional as formal-and-long when I mean clear-and-brief" is a usable sentence. "It is bad" is not.

What this step produces

  • A one-sentence statement of the wrong interpretation.
  • A clear sense of which single dimension is being misread.
  • The target boundary you will teach in later steps.

Step Two: Collect Real Failure Examples

Your negatives should come from the model, not your imagination.

Harvest actual wrong outputs

From the runs in step one, save two or three outputs that exemplify the wrong interpretation. These are your candidate negatives, and because they are real, they target the model's genuine tendencies rather than imagined ones.

What to keep

  • Outputs that are plausible but clearly the wrong reading.
  • Variety within the wrong interpretation, so you can pick the cleanest example.
  • Notes on what specifically makes each one wrong.

Step Three: Write the Positive Example

Now define the target precisely.

Make the positive a near-twin of the negative

Write the output you actually want for the same input as one of your negatives. Keeping the input identical is what lets the model isolate the distinction. This mirrors the format-teaching logic in Teach a Model Your Format Without Writing Code, with a sharper boundary.

Quality checks

  • The positive and negative should share the same input.
  • They should differ only in the dimension you named in step one.
  • The positive should be unambiguously what you want, not a compromise.

Step Four: Isolate a Single Variable

This is the step that makes or breaks the contrast.

Strip out incidental differences

Compare your positive and negative. If they differ in more than the target dimension, edit them until the only meaningful difference is the one you are teaching. A pair that differs in length and tone and structure teaches a muddled lesson.

How to enforce isolation

  • List every way the two examples differ.
  • For each difference that is not your target, make the two match.
  • Confirm that what remains is exactly the distinction from step one.

Step Five: Assemble the Contrastive Prompt

Put the pieces together explicitly.

Structure for clarity

State the task, present the negative labeled as undesired, present the positive labeled as desired, and briefly name the reason. Then give the real input. Explicit labels prevent the model from guessing which example to emulate.

A reusable skeleton

  • Task instruction.
  • "Avoid outputs like this:" plus the negative.
  • "Produce outputs like this:" plus the positive.
  • A one-line reason for the distinction, then the actual input.

Step Six: Validate on Held-Out Inputs

Test where it counts: on inputs you did not use to build the prompt.

Confirm generalization

Run the assembled prompt on several fresh inputs near the boundary. Success is the model applying the distinction to inputs it has not seen, not just reproducing your examples. The validation mindset echoes Running a Complex Task Through One Sub-Prompt at a Time, where each step is checked before moving on.

What to watch for

  • Generalization: does it work on new inputs near the boundary?
  • Overcorrection: has the model swung too far toward avoiding the negative?
  • New ambiguity: did fixing this reading open a different one?

Step Seven: Iterate or Lock

Decide whether the contrast is done.

The exit criterion

If the prompt handles held-out inputs correctly without overcorrecting, lock it and document the pair. If not, return to the step that failed: a generalization miss usually means the negative was unrealistic, and overcorrection usually means the contrast was too extreme.

Documentation to keep

  • The ambiguity statement from step one.
  • The final contrastive pair and the reason for it.
  • The held-out inputs used to validate, for future regression checks.

A Full Pass on One Example

To make the sequence concrete, run it once end to end.

The case

A model summarizing customer reviews keeps including the reviewer's name and date, which you do not want. You want only the substance of the feedback.

The pass

  • Step one: the ambiguity is "it treats metadata as part of the summary when I want substance only."
  • Step two: collect three real summaries that include names and dates.
  • Step three: write the desired metadata-free summary for the same review.
  • Step four: ensure the only difference between desired and undesired is the metadata, not length or tone.
  • Step five: assemble the prompt with both labeled and the reason "exclude reviewer identity and timing."
  • Step six: validate on reviews you did not use, confirming names and dates are dropped without losing substance.

This single worked pass is the template for any ambiguity you face.

Handling Stubborn Ambiguities

Some ambiguities resist a single pair.

When one pair is not enough

Occasionally the model fixes the reported case but still stumbles on a distinct, related reading. The instinct to pile on pairs is dangerous, so proceed carefully.

The disciplined extension

  • Confirm the second issue is genuinely distinct, not the same ambiguity reappearing.
  • Build a second, separately isolated pair for it, holding everything else constant.
  • Re-validate both distinctions together to ensure the pairs do not conflict, a caution echoed in Seven Ways Task Decomposition Quietly Sabotages Your Prompts.

Frequently Asked Questions

What if I cannot articulate the ambiguity in one sentence?

Then you are not ready to write examples yet. Keep running the prompt and studying its wrong outputs until you can name the specific interpretation it is choosing. The sentence is the prerequisite, not an optional nicety.

Should the positive and negative use the same input?

Yes, whenever possible. Sharing the input is what lets the model isolate the one dimension that differs. Different inputs introduce noise that can teach the wrong distinction.

How many contrastive pairs should the final prompt have?

Often one well-isolated pair is enough. Add a second only if a distinct ambiguity remains after validation. More pairs increase the risk of teaching conflicting lessons.

My fix worked on the examples but not on new inputs. What went wrong?

The lesson did not generalize, usually because the negative was unrealistic or the pair differed in too many ways. Return to steps two and four, use a real failure, and isolate a single variable.

How do I tell overcorrection from a correct fix?

Overcorrection shows up as the model avoiding the negative so hard that the output becomes distorted in the opposite direction. If brief became uselessly terse, you overcorrected; soften the contrast.

Do I need to keep the held-out inputs after locking the prompt?

Yes. They become your regression set. If you later change the prompt or the model updates, re-running those inputs tells you whether the disambiguation still holds.

Key Takeaways

  • Name the exact wrong interpretation in one sentence before writing any examples.
  • Source negatives from the model's real failures, not from imagination.
  • Build the positive on the same input as the negative so the distinction is isolated.
  • Strip every incidental difference until only the target dimension varies.
  • Validate on held-out inputs to confirm the distinction generalizes without overcorrecting.
  • Keep the validation inputs as a regression set for future changes.

Search Articles

Categories

OperationsSalesDeliveryGovernance

Popular Tags

prompt engineeringai fundamentalsai toolsthe difference between AIMLagency operationsagency growthenterprise sales

Share Article

A

Agency Script Editorial

Editorial Team

The Agency Script editorial team delivers operational insights on AI delivery, certification, and governance for modern agency operators.

Related Articles

General

Prompt Quality Decides Whether AI Earns Its Keep

Prompt quality is the single biggest variable in whether AI delivers real work or expensive noise. The model matters, the platform matters — but the prompt you write determines whether you get a first

A
Agency Script Editorial
June 1, 2026·10 min read
General

Counting the Real Cost of Every Token You Send

Tokens and context windows sit at the intersection of AI capability and operational cost—yet most business cases treat them as technical footnotes. That's a mistake that costs real money. Every time y

A
Agency Script Editorial
June 1, 2026·10 min read
General

Rolling Out AI Hallucinations Across a Team

Most teams discover AI hallucinations the hard way — a confident-sounding wrong answer makes it into a client deliverable, a legal brief, or a published report. The damage isn't just to the output; it

A
Agency Script Editorial
June 1, 2026·11 min read

Ready to certify your AI capability?

Join the professionals building governed, repeatable AI delivery systems.

Explore Certification