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: Write the Unconstrained Request FirstCapture what you actually wantNote the variabilityStep Two: Add a Format ConstraintSpecify the structure explicitlyShow the shape if it is non-obviousStep Three: Add Length and Scope LimitsMake the limit countableMatch the limit to the purposeStep Four: Add Content RulesState inclusions and exclusionsKeep each rule single-purposeStep Five: Test and Resolve ConflictsCheck each constraint individuallyFix conflicts by setting priorityStep Six: Lock It In and ReuseSave the working promptReuse across runs and peopleA Worked Example, Step by StepApplying the steps in orderWhy the order matteredAdapting the Procedure to Harder TasksExpect more rounds of testingFrequently Asked QuestionsWhy start with an unconstrained request instead of jumping to constraints?Which constraint should I add first?How do I handle a constraint the AI keeps breaking?What is the fastest way to spot a conflict?Do I really need to save the prompt?How many constraints is too many?Key Takeaways
Home/Blog/Shaping Model Output One Step at a Time
General

Shaping Model Output One Step at a Time

A

Agency Script Editorial

Editorial Team

·November 9, 2021·7 min read
constraint-based output promptingconstraint-based output prompting how toconstraint-based output prompting guideprompt engineering

Knowing that constraints make AI output reliable is one thing; having a concrete procedure for applying them is another. This article is the procedure. It walks through, in order, how to take a request that produces unpredictable results and turn it into one that produces consistent, usable output every time. You can follow it step by step on a real task right now.

The approach is deliberately sequential. Each step builds on the previous one, and skipping ahead tends to produce the exact ambiguity you are trying to remove. The whole procedure takes a few minutes the first time and becomes second nature quickly. By the end you will have not just a better prompt but a repeatable way to build better prompts.

If you have never encountered constraints before, the gentle introduction in Telling AI Exactly What an Answer Should Look Like is the place to start; this article assumes you know what a constraint is and want a method for using them well.

Step One: Write the Unconstrained Request First

Start with the bare task before adding any rules.

Capture what you actually want

Write the plain instruction, summarize this, classify that, draft the other, and run it once. The point is not to get a good result; it is to see how the AI handles the request when nothing is fixed. The ways the output varies, length, format, focus, are exactly the gaps you will close with constraints.

Note the variability

  • Did the length surprise you?
  • Was the structure different from what you expected?
  • Did it include or omit things you cared about?

Each surprise is a constraint waiting to be written.

Step Two: Add a Format Constraint

Fix the shape of the answer before anything else.

Specify the structure explicitly

Decide what form the output should take, a numbered list, a table with named columns, valid JSON, a yes or no followed by a reason, and state it plainly. Format is the highest-leverage constraint because it makes the output predictable and checkable in one move.

Show the shape if it is non-obvious

When the format is anything but trivial, include a tiny example of the desired output. Seeing the shape lets the AI copy it directly. This is the same principle that makes constrained templates reliable in document work, as described in A Process You Can Hand Off for AI Document Rewrites.

Step Three: Add Length and Scope Limits

Now bound how much the AI produces.

Make the limit countable

Use a specific, checkable number: "in no more than 100 words," "exactly five items," "one paragraph." Vague limits like "keep it brief" leave the AI to guess and produce the variability you are trying to eliminate.

Match the limit to the purpose

A limit that is too tight forces the AI to drop things you need; too loose and it pads. Set the bound to the smallest amount that still carries everything essential, and adjust after you see the result.

Step Four: Add Content Rules

Control what must and must not appear.

State inclusions and exclusions

Spell out what the answer must contain and what it must avoid: "use only the information I provided," "do not speculate," "preserve every defined term." These are the constraints that protect accuracy, especially when you are reshaping source material where fidelity matters, a concern detailed in What Goes Wrong When You Rewrite Documents With AI.

Keep each rule single-purpose

Write each content rule to do one thing. A rule that tries to cover three concerns is hard for the AI to honor and hard for you to check.

Step Five: Test and Resolve Conflicts

Run the constrained prompt and inspect it against every rule.

Check each constraint individually

Go through your constraints one at a time and confirm the output honored each: right format, within the limit, content rules respected. This is fast because good constraints are checkable by design.

Fix conflicts by setting priority

If the AI satisfied some constraints by breaking others, you probably have a conflict, often completeness versus a tight length limit. Decide which wins and tell the AI explicitly: "stay under the word limit even if you must cut detail." Making the priority a stated rule resolves the tension.

Step Six: Lock It In and Reuse

Once the prompt produces what you want, capture it.

Save the working prompt

Store the finished, constrained prompt where you can reuse it rather than rebuilding it each time. A saved, reliable prompt is a small asset that pays off on every future run.

Reuse across runs and people

A locked-in constrained prompt is what lets many people get the same result from the same request. That reusability is the foundation of scaling any AI practice across a team, the theme of An Operating Cadence for AI Document Rewrites.

A Worked Example, Step by Step

To make the procedure concrete, walk through a single realistic task: turning a long customer email thread into a short status update for a manager.

Applying the steps in order

  • Step one, unconstrained: "Summarize this email thread." The result varies wildly in length and sometimes buries the status in narrative.
  • Step two, format: "Summarize this thread as three labeled lines: Status, Blocker, Next Step." Now the shape is fixed and scannable.
  • Step three, length: "Keep each line to one sentence." This forces the model to prioritize rather than ramble.
  • Step four, content: "Use only information stated in the thread; do not infer a status that was not mentioned." This guards against the model inventing a tidy conclusion the thread never reached.
  • Step five, test: confirm there are exactly three labeled lines, each one sentence, and that the status actually appears in the thread.

Each step removed a specific way the first answer could have disappointed you, and the final prompt is reusable for every future thread.

Why the order mattered

Notice that fixing the format first made the length and content rules easier to write, because you were constraining a known structure rather than an open blob of text. Had you started with content rules on an unstructured answer, you would have been chasing a moving target. The sequence is not arbitrary; each step makes the next one cleaner.

Adapting the Procedure to Harder Tasks

The six steps scale up to more demanding work with one adjustment: more iteration.

Expect more rounds of testing

On a simple task, one pass through the steps often produces a reliable prompt. On a harder task, with more constraints and more room for conflict, plan to cycle through steps five and six several times, tightening one constraint, retesting, and adjusting the next. The procedure stays the same; you just run the test-and-fix loop more often until the output stabilizes.

Frequently Asked Questions

Why start with an unconstrained request instead of jumping to constraints?

Because the unconstrained run shows you exactly where the output varies, and each point of variation is a constraint worth adding. Starting blind, you tend to constrain the wrong things and miss the ones that actually caused trouble.

Which constraint should I add first?

Format. Fixing the structure of the answer is the highest-leverage move and makes everything else, length, content, easier to specify and check. Add format, then length and scope, then content rules.

How do I handle a constraint the AI keeps breaking?

Make it more specific, give it prominence, and check whether it conflicts with another constraint. Persistent violations almost always mean the rule was vague, buried, or impossible to satisfy alongside something else you asked for.

What is the fastest way to spot a conflict?

Check whether satisfying one constraint forced the AI to break another, like hitting a word limit by dropping required content. When you see that pattern, set an explicit priority telling the AI which rule wins.

Do I really need to save the prompt?

If you will run a similar task again, yes. Rebuilding a good constrained prompt from scratch each time wastes the work you already did and reintroduces variability. A saved prompt is reusable and shareable.

How many constraints is too many?

There is no fixed number, but stop adding once the output is reliable, and watch for constraints that fight each other. Past the point of reliability, extra constraints add complexity without benefit and raise the odds of a conflict.

Key Takeaways

  • Start with the unconstrained request so the points of variation tell you which constraints to add.
  • Add format constraints first; they are the highest-leverage and most checkable.
  • Use countable length limits and single-purpose content rules.
  • Test every constraint individually and resolve conflicts by stating an explicit priority.
  • Save the working prompt so it can be reused and shared across runs and people.
  • Stop constraining once the output is reliable; extra rules only invite conflicts.

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