← LEARN

Using Roles,Constraints & Examples.

Roles, constraints and examples can give you more control over AI output. The key is knowing when they actually improve the task and when they only make the prompt longer.

01 / ROLES

Use a role when perspective changes the answer.

A role tells AI what kind of viewpoint or working perspective should guide the response. This can be useful when the same task could be approached differently by different functions.

But a role is not magic. Writing “act as an expert” does not automatically make an answer accurate. The task, context and evidence still matter.

Operations perspective

PROMPT

Act as an operations manager reviewing this process.

Useful when you want the response framed around efficiency, risk, coordination and execution.

Customer-service perspective

PROMPT

Act as a customer service supervisor.

Useful when tone, clarity and customer impact matter.

Trainer perspective

PROMPT

Explain this as a workplace trainer.

Useful when you want a structured explanation for beginners.

USE A ROLE WHEN

The perspective affects priorities, terminology, tone or the way the task should be evaluated.

02 / CONSTRAINTS

Constraints define what the answer must and must not do.

Constraints are one of the most practical ways to improve prompt control. They help reduce unwanted assumptions, excessive detail, wrong formats and recommendations outside your actual scope.

01

Length

Keep the answer under 200 words.

02

Format

Return the answer as a five-step checklist.

03

Scope

Focus only on warehouse receiving operations.

04

Evidence

Do not invent facts that are not provided.

05

Language

Use simple English suitable for frontline staff.

06

Decision limits

Do not approve or reject the request. Only summarize the risks.

WATCH FOR CONFLICTS

Do not give AI incompatible constraints such as “be extremely detailed” and “keep the answer under 50 words.” If two instructions compete, the result becomes less predictable.

03 / EXAMPLES

Examples show AI what you mean instead of only describing it.

Examples are especially useful when the desired format, style or classification is difficult to explain precisely in one sentence.

01

Format example

Show AI what the final answer should look like when structure matters.

02

Style example

Provide a short sample when you want a specific communication style.

03

Classification example

Show one or two labelled examples when AI needs to sort information into categories.

04

Before-and-after example

Useful when asking AI to rewrite or improve content while preserving the original meaning.

WITHOUT EXAMPLE

Rewrite these warehouse instructions in a clear professional style.

WITH STYLE EXAMPLE

Rewrite these warehouse instructions in a clear professional style. Use short direct sentences similar to this: “Verify the item code before confirming receipt. Report any mismatch before posting the transaction.”

04 / PUTTING THEM TOGETHER

Use only the controls that improve the real task.

Imagine you need help preparing a management summary after a stock discrepancy investigation.

ROLE
Set the useful perspective

Act as an inventory control supervisor.

TASK
Define the job

Prepare a concise investigation summary for management.

CONTEXT
Provide the facts

System quantity is 840 units and verified physical quantity is 818 units. Receiving, dispatch and recent adjustment transactions have been checked.

CONSTRAINT
Control the answer

Do not state a root cause unless it is supported by the information provided.

EXAMPLE
Show the required structure

Use the headings: Variance, Checks Completed, Findings, Outstanding Questions, Recommended Next Action.

ASSEMBLED PROMPT

Act as an inventory control supervisor. Prepare a concise investigation summary for management. System quantity is 840 units and verified physical quantity is 818 units. Receiving, dispatch and recent adjustment transactions have already been checked. Use the headings: Variance, Checks Completed, Findings, Outstanding Questions and Recommended Next Action. Do not state a root cause unless it is supported by the information provided.

05 / WHAT TO AVOID

More instructions do not automatically create a better prompt.

01Fake expertise

Do not rely on “act as a world-class expert” instead of providing proper context and evidence.

02Too many constraints

Avoid adding rules that do not materially improve the output.

03Conflicting instructions

Check that tone, length, format and detail requirements can all be satisfied together.

04Bad examples

AI may imitate the weaknesses of the example you provide, so use examples that actually represent the quality you want.

05Over-controlling creative tasks

Leave room for useful variation when you are brainstorming or exploring ideas.

06 / QUICK CHECK

Before adding another instruction, ask whether it earns its place.

01

Would a role genuinely improve the perspective?

✓
02

Which constraints are essential to the task?

✓
03

Could an example remove ambiguity?

✓
04

Am I giving instructions that conflict with each other?

✓
05

Have I kept the prompt practical rather than overloaded?

✓
06

Will I still review the final result myself?

✓
SIMPLE RULE

Add a role for perspective, a constraint for control, and an example for clarity. If one of them does not improve the task, leave it out.

07 / PRACTICAL TAKEAWAY

Use prompt controls deliberately.

Start with the task and context. Then add roles, constraints or examples only where they make the expected result clearer.

01Role

Choose the useful perspective.

→
02Constraint

Set meaningful boundaries.

→
03Example

Show what good looks like.

→
04Review

Remove anything unnecessary.

BUILD IT WITH KRIYANO

Put these controls into a structured prompt.

Use the KRIYANO Prompt Builder to combine role, context, output requirements, tone and constraints without losing sight of the main task.

Open Prompt Builder
NEXT LESSON

Improving a Weak Prompt

Learn a practical step-by-step method for diagnosing a weak prompt and improving it without rewriting everything from scratch.

CONTINUE →