Best practices for writing generative procedures for AI agents

Generative proceduresare flexible conversation flows that useagentic AIto guide an AI agent's responses and actions during a conversation with a customer.


What's my plan?






All Suites

Team, Growth, Professional, Enterprise, or Enterprise Plus









Support

Team, Professional, or Enterprise







Generative procedures are flexible conversation flows that
use agentic AI to guide an AI agent's responses
and actions during a conversation with a customer.
This article provides some best practices for writing and optimizing procedures. When
creating a generative procedure, keep these
best practices in mind. Adhering to these guidelines helps you write more effective
procedures.
This article contains the following topics:

Use clear, specific language
Break down complex tasks
Present steps in logical, sequential order
Define clear conditions and actions
Maintain consistent terminology
Avoid combining multiple actions in one step
Include requests for feedback before executing conditional steps
Provide examples when helpful
Anticipate and handle errors
Highlight critical steps
Use an imperative, direct writing style
Test, iterate, and update regularly

Related articles:


Examples of generative procedures for AI
agents

Managing generative procedures



Use clear, specific language

Write each step using simple, direct words. Avoid vague terms, jargon, and complex
sentences to ensure the AI interprets instructions correctly. Specify exactly what
information is needed to avoid misunderstandings.
Additionally, writing in English helps optimize flows. However, performance is still
the same in all major languages.


Good: "Ask the customer to provide their 10-digit account number."

Bad: "Request account info from the user." (It’s ambiguous what “account
info” means without more context.)




Break down complex tasks

Divide complicated processes into smaller, focused steps. Each step should represent
a single, manageable action, improving clarity and execution.


Good:
“Verify customer identity.
Check account balance.
Process payment.”



Bad: "Verify identity and check balance and process payment in one step."





Present steps in logical, sequential order

Arrange instructions in the order the AI should execute them, reflecting the actual
workflow. Use numbered or clearly structured lists.


Good: Steps follow the natural flow: Greet → Verify → Diagnose →
Resolve/Escalate

Bad: "Verify identity after escalating the issue."




Define clear conditions and actions

Use explicit “If… then…” statements with precise instructions for each condition and
the resulting action or next step. This reduces ambiguity and guides
decision-making.


Good: “If the payment can’t be processed, then tell the user there was a
problem with the payment and ask them for a different payment method.”

Bad: "If there’s a problem with payment, handle it accordingly."




Maintain consistent terminology

Always use the exact same names for entities (for example, plans, policies, or
billing types) throughout the procedure to prevent confusion or misinterpretation.
Consistent naming prevents the AI from mixing terms. To see the already-created
entities, type a forward slash (/) or click the plus icon (+) in the procedure editor.


Good: Always refer to "Premium Plan" when discussing that service
level.

Bad: Alternate between "Premium Plan," "Gold Plan," and "top-tier
subscription."




Avoid combining multiple actions in one step

If a step involves more than one major task, split it into separate steps to keep
instructions clear and unambiguous. This prevents skipping or misunderstanding
tasks.


Good:
Step 1: Confirm the issue reported by the customer.
Step 2: Provide troubleshooting steps based on issue type.



Bad: "Confirm the customer’s issue and then provide troubleshooting and
escalate if unresolved."




Include requests for feedback before executing conditional steps

Whenever you include a conditional step in your procedure, the AI agent should first
ask the customer a clarifying question to ensure that the conditional is ready to be
evaluated. This helps prevent the AI agent from sending the same reply twice.
In other words: Tell → Ask → Conditional, instead of Tell → Conditional.


Good: “Here’s the policy. Do you need anything else?” Or, "Did that
answer your question?" Or, "Let me know if you have any questions about this."
The conditional branch then triggers only after the user’s reply,
eliminating a potential duplicate response.


Bad:
Step 1: The AI agent tells the user something, but doesn’t ask a
clarifying question.
Step 2: A conditional branch that should run only if the user later asks
a very specific follow-up. Because the AI agent isn’t told to wait
between step 1 and step 2, it immediately evaluates the vague
condition, finds nothing to match, and resends the last message.








Provide examples when helpful

Include contextual examples for common scenarios to clarify expected outcomes and
reduce ambiguity. Examples guide the AI’s tone and content.


Good: "If the customer says ‘My bill is too high,’ respond with: ‘I see
your charges include extra data usage this month.’"

Bad: No example given, leaving the AI unsure how to respond.




Anticipate and handle errors

Include instructions for error handling, such as what to do if data is missing,
incomplete, or contradictory, to ensure robustness and reliability.


Good: "If API returns 'timeout', retry up to 2 times. If still failing,
escalate the request."

Bad: "If the API call fails, try again." (No retry limit or fallback.)





Highlight critical steps

Use capital letters or other formatting techniques to emphasize important or
mandatory steps within the procedure, reducing the risk of compliance or operational
errors.


Good: "VERIFY CUSTOMER IDENTITY BEFORE DISCLOSING ACCOUNT
INFORMATION."

Bad: No emphasis on identity verification step.




Use an imperative, direct writing style

Write steps as commands or instructions (for example, “Check if…”, “Ask the
customer…”, or “Escalate the request if…”) to avoid uncertainty and vagueness.


Good: "Ask for the customer’s last payment date."

Bad: "You might want to ask when they last paid."




Test, iterate, and update regularly

Continuously test the procedure with real interactions, gather feedback, and revise
the steps as policies or customer needs evolve to maintain accuracy and customer
satisfaction.


Good: Review procedures monthly and adjust steps based on customer
feedback or policy changes.

Bad: Write once and never revise.



{
"@context": "https://schema.org",
"@type": "TechArticle",
"@id": "https://support.zendesk.com/hc/en-us/articles/9424547622298",
"url": "https://support.zendesk.com/hc/en-us/articles/9424547622298",
"headline": "Best practices for writing generative procedures for AI agents",
"description": "You can improve AI agent interactions by writing generative procedures that use clear language, logical steps, consistent terminology, and error handling while regularly testing and updating them.",
"articleSection": "AI agent best practices",
"datePublished": "2025-06-27T14:10:53+00:00",
"dateModified": "2026-05-12T17:42:51.684948+00:00",
"inLanguage": "en-US",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/9424547622298"