Skip to main content

Establishing Behavioral Rules for AI Agents: Guidelines and Categories

Define rules and guidelines to control how your AI Agent behaves in different situations.

Written by Roohul Shah

Setting Up Guidelines (Behavioral Rules)

Guidelines are rules your AI Agent follows in every conversation. Unlike Knowledge Sources and Facts (which the AI pulls in when they're relevant to a question), guidelines are always active. They shape how the agent behaves across all interactions.

Go to AI Agent → Knowledge Base → Guidelines to manage them.

What Guidelines Are For

Guidelines solve the "always-on rule" problem. Some instructions need to apply to every conversation, not just when a customer asks a specific question. For example:

  • You always want the agent to escalate allergy-related complaints, regardless of what the customer asked

  • You never want the agent to discuss a specific topic

  • You want the agent to mention your loyalty program whenever it makes sense

These don't fit neatly into a document or a Q&A pair. They're behavioral rules.


Categories

Guidelines are organized into four categories to help you manage them:

Category

Use For

Safety

Rules that protect customers or your brand from harm

Policy

Rules that enforce your store policies in conversations

Sales

Rules that guide selling behavior and promotions

General

Anything else

Categories are for your organization only. They don't change how the AI applies the guideline.

Good Guidelines (With Examples)

The best guidelines are specific, actionable, and clearly scoped. The agent should know exactly what to do when the guideline applies.


Safety:

  • "If a customer mentions an allergic reaction to any product, immediately escalate to a human agent."

  • "Never recommend a dosage or usage amount for supplements. Direct the customer to the product label."

  • "If a customer reports a product causing skin irritation, express concern and escalate to our support team."

Policy:

  • "We do not price match. If a customer asks about price matching, let them know politely and offer to help them find the best current deal."

  • "All final sale items are non-returnable. If a customer asks to return a final sale item, explain the policy and offer store credit as an alternative."

  • "Gift cards cannot be returned or exchanged for cash."

Sales:

  • "If a customer is considering a purchase but seems hesitant, mention our loyalty program and the points they'd earn."

  • "When a customer asks about a product that's out of stock, suggest a similar alternative from our catalog."

  • "If a customer mentions they're shopping for a gift, ask about the recipient's preferences to make a personalized recommendation."

General:

  • "If a customer mentions they found us through TikTok, thank them and mention we post new content weekly."

  • "When a customer compliments a product, thank them and ask if they'd like to leave a review."

  • "If a customer asks about wholesale or bulk orders, let them know we offer bulk pricing and escalate to our sales team."

What NOT to Do

Too vague:

Bad

Why

Better

"Be nice to customers."

The agent already does this based on your tone settings.

(Remove it. Your tone sliders handle this.)

"Follow our policies."

Which policies? The agent doesn't know what to do with this.

"All final sale items are non-returnable. Offer store credit as an alternative."

"Sell more products."

Not actionable. The agent can't translate this into a specific behavior.

"When a customer adds a single item to their cart, suggest a complementary product."

Too restrictive:

Bad

Why

Better

"Never talk about anything except our products."

Customers ask about shipping, returns, and policies too. This would prevent the agent from being helpful.

"If a customer asks about something unrelated to our store, politely redirect the conversation."

"Only answer questions about shoes."

Blocks the agent from handling returns, shipping, order status, etc.

"Our primary product is shoes. When recommending products, focus on footwear."

Contradicting your own knowledge base:

Bad

Why

"Tell customers we offer free returns." (when your return policy document says returns cost $7.95)

The agent will receive conflicting information. Update your Knowledge Source or Fact instead.

"Our shipping takes 1-2 days." (when your shipping policy says 5-7 days)

Use a Fact to update shipping times, not a guideline.

Trying to override the agent's core behavior: Some guidelines will be rejected because they conflict with the agent's safety rules. These include instructions that:

  • Ask the agent to share customer personal information with third parties

  • Make false health, safety, or medical claims

  • Direct customers away from your store to competitors

  • Ask the agent to make unauthorized financial commitments like refunds beyond your policy

  • Contain harmful, offensive, or discriminatory content

If a guideline is rejected, you'll see an error message. Rephrase the guideline to focus on the customer interaction behavior you want, not on overriding how the agent operates.


Auto-Extracted Guidelines

When you add a Knowledge Source, TxtCart may suggest guidelines based on the content. For example, if your return policy document mentions "original packaging required," it might suggest: "Remind customers that returns must include original packaging."

These show up in the Guidelines tab as Pending Review. Review each one:

  • Approve if the rule is something you want applied to every conversation

  • Dismiss if it's too specific (it may be better served as a Fact or Verified Answer) or not relevant as an always-on rule

Not every piece of policy content should be a guideline. If it's a detail that only matters when a customer asks about returns, a Fact or Verified Answer is a better fit. Guidelines are for rules that should influence the agent's behavior all the time.


Guidelines vs. Facts vs. Verified Answers

Guideline

Fact

Verified Answer

When it's used

Every conversation

When the AI retrieves it as relevant

When a customer question matches

Purpose

Shape behavior

Provide information

Control exact response

Example

"Always escalate allergy complaints"

"We offer free returns within 30 days"

Q: "What's your return policy?" A: "We offer free, no-questions-asked returns..."

Max length

500 characters

2,000 characters

5,000 characters (answer)

Rule of thumb: If it's something the agent should always keep in mind, it's a guideline. If it's a piece of information the agent should know when asked, it's a fact. If you need to control the exact wording of a response, it's a verified answer.

Tips

  • Keep guidelines concise. Max 500 characters, but shorter is better. Clear, direct instructions work best.

  • Don't duplicate what your tone settings already handle. Guidelines like "be friendly" or "be professional" are redundant if you've already configured your tone sliders.

  • Test in the Playground. After adding a guideline, test a scenario where it should apply and verify the agent follows it.

  • Fewer is better. 5-15 well-written guidelines outperform 50 vague ones. Each guideline the agent needs to consider adds complexity. Focus on the rules that genuinely matter.

  • Review auto-extracted guidelines carefully. Not everything in your documents should be an always-on rule. Be selective about what you approve.





💡Tip:

Still have questions?

Please feel free to reach out to our wonderful Support team at support@txtcart.ai or via Live Chat.


Did this answer your question?