Learn AI compute, then follow the market
← Back to Compute College

Compute College

Clear instructions and constraints

Write direct AI instructions with priorities, boundaries, edge cases, and constraints that reduce ambiguity without creating a brittle prompt.

Plain-English definition

Clear instructions tell a model what operation to perform, what order to follow when requirements compete, and what to do when the input is incomplete or outside scope. Constraints define boundaries such as allowed sources, output length, prohibited actions, required fields, or when to ask for clarification. Good constraints make the intended behavior easier to test; they do not attempt to enumerate every sentence the model might ever see.

Memory trick: Clear instructions define the lane. Constraints define the guardrails. Fallbacks define what happens when the road ends.

Why it matters

Ambiguous or conflicting instructions create inconsistent outputs and make failures difficult to diagnose. Overly long instruction blocks can also consume tokens, introduce contradictions, and leave less room for the information needed for the current task. A short hierarchy of priorities and explicit edge-case behavior gives the model a narrower decision surface and gives reviewers a stable contract.

  • Prioritized requirements help the model resolve conflicts instead of satisfying incompatible instructions at random.
  • Scope boundaries reduce unsupported answers, unnecessary tool calls, and risky actions outside the intended task.
  • Shorter, testable instructions can reduce input tokens and retries without sacrificing the quality condition that matters.

Simple example

For a support triage workflow, write: “Classify only the customer’s current request. Use the ticket text and the policy excerpt provided below. If the policy does not answer the question, return `needs_human_review`; do not invent a policy. Return one category, one-sentence rationale, and the supporting quote.” The instruction defines scope, source authority, the fallback, and output requirements.

  • The word “only” limits the system from solving adjacent problems the user did not ask about.
  • The fallback creates a safe behavior when evidence is missing instead of rewarding a guess.
  • The output contract is small enough for a validator and specific enough for a reviewer.

Example figures are illustrative calculations, not current quoted market prices.

Current example

Instruction design references

Prompt guidance from OpenAI and Google emphasizes specific instructions, relevant context, explicit output requirements, and breaking complex work into manageable steps. The implementation details vary by model and API, so test the behavior under the provider and mode you intend to use.

OpenAI prompt-engineering best practices

Guidance on clear instructions, delimiters, desired format, and reducing ambiguity in model requests.

Source discipline: instruction techniques are not safety guarantees. Validate outputs, enforce permissions in code, and keep untrusted text separate from governing instructions.

Common mistake

A wall of absolute rules often creates contradictions: never do this, always do that, except when another rule applies. The team may not know which behavior to expect. Use a small priority order, explicit fallback states, and deterministic checks for rules software can enforce.

Practical takeaway

What you can do with this

Rewrite one prompt into four blocks: task, priorities, constraints, and fallback behavior. Add two edge cases that should fail safely, then compare the revised prompt with the old version on the same test set while recording output tokens, retries, and accepted-task rate.

  • Builders: enforce permissions, schemas, and irreversible actions outside the prompt wherever possible.
  • Product teams: decide which missing-information behavior is useful to the user before asking for “helpful” completion.
  • Operators: version instruction changes and watch for token, latency, retry, and tool-use regressions.

Decision check: does the prompt state what takes priority, what is out of scope, and what happens when the required evidence is missing?

Compute College track

Prompt & Context Engineering

Step 4 of 18: Clear instructions and constraints