Rulesets Explained
= Rulesets in Gen AI Builder provide behavioral and policy guidance to AI Assistants and Griptape Structures. They define how your AI should behave — shaping tone, style, compliance, and persona.
Rulesets complement Knowledge Bases and Retrievers:
- Knowledge Bases provide what the AI knows.
- Rulesets define how the AI responds.
Rulesets are essential for building governed, brand-aligned, and compliant AI experiences in enterprise environments.
Before you start
Prerequisites for understanding Rulesets:
- Basic understanding of Assistants and how they generate responses
- Familiarity with Knowledge Bases and Retrievers in AI Factory
- Awareness of Griptape Structures and how they control RAG pipelines
Suggested reading:
- Assistants Explained
- Retrievers Explained
- Knowledge Bases Explained
- Structures Explained
- AI Factory Concepts
What is a Ruleset?
A Ruleset is a collection of natural language instructions that guide the behavior of an Assistant or Structure.
Rulesets:
- Control tone and style
- Enforce legal, ethical, or organizational policies
- Define Assistant personas
- Provide consistent behavior across applications
- Support auditable AI governance
Without Rulesets: Assistants rely solely on base model behavior — which may not align with your enterprise standards.
How Rulesets work
At runtime:
→ Ruleset → Behavioral Instructions → LLM Prompt → AI Response
- The Retriever gathers content from Knowledge Bases.
- The Ruleset is injected into the Assistant’s system prompt.
- The LLM uses:
- The Ruleset to guide tone, style, and behavior.
- The retrieved content to ground the response.
- The user query as primary input.
- The final response reflects both content grounding and Ruleset-driven behavior.
Rulesets are implemented as Griptape Structures and fully support modular, reusable patterns.
Why use Rulesets
- Governed behavior — enforce compliance and legal requirements.
- Brand alignment — ensure Assistants reflect your organizational voice.
- Persona support — build distinct personas for different use cases.
- Explainability — provide clear behavioral logic for audit and review.
- Sovereign AI — define controlled behavior fully within your governed infrastructure.
Rulesets are critical for production-grade Assistants — especially in regulated industries.
Components of a Ruleset
A Ruleset includes:
- Natural language Rules — clear instructions to the LLM (e.g., tone, forbidden phrases, required disclaimers).
- Metadata — versioning, tracking, and audit support.
- Aliases — to enable shared Rulesets across multiple Assistants.
Rules are expressed in natural language and injected at prompt time via Griptape.
Patterns of use
Single Ruleset → One Assistant
- Simple pattern.
- One Ruleset assigned to one Assistant.
- Example:
Customer Support Tone
→Support Assistant
.
Shared Ruleset → Multiple Assistants
- A global Ruleset reused across many Assistants.
- Example:
Financial Advice Disclaimer
→ used by: Wealth Management Copilot
Internal Policy Checker
Client-Facing Advisor Assistant
Layered Persona Rulesets
- Compose an Assistant’s behavior from multiple Rulesets:
- Brand Tone
- Legal Compliance
- Assistant Persona
- Example:
Global Compliance
+Banking Brand Tone
+Wealth Advisor Persona
Dynamic Persona Switching
- Advanced use case:
- Assistants switch persona Rulesets at runtime based on user context.
- Example:
- One Assistant dynamically applies:
Retail Client Tone
for B2C users.Institutional Investor Tone
for B2B users.
Best practices
- Write clear, unambiguous Rules in plain natural language.
- Test Rulesets in context — ensure they interact well with retrieved content.
- Avoid overlapping or contradictory Rules.
- Modularize Rulesets for reuse:
- Global Compliance
- Tone of Voice
- Persona-specific behavior
- Use versioned Rulesets and maintain an audit trail in regulated environments.
- Review and refresh Rulesets regularly to align with evolving policies and brand guidance.
Sovereign AI alignment
Rulesets play a key role in Sovereign AI within EDB PG AI:
- You control all Ruleset content — no external models define behavior.
- Rulesets are fully auditable and can be versioned and reviewed.
- Behavior governance is enforced inside your infrastructure — aligned with Knowledge Bases and Model Serving.
- Combined with observability, Rulesets enable:
- Transparent governance of AI behavior.
- Alignment with legal and compliance frameworks.
- Explainability for end users and auditors.
Summary
Rulesets are a foundational element of production AI pipelines:
- Control behavior, tone, and compliance
- Enable consistent brand voice
- Support complex personas and layered behavior
- Fully auditable and versionable
- Critical for Sovereign AI governance in enterprise environments
Without Rulesets, Assistants lack necessary guardrails and cannot meet enterprise-grade governance requirements.
Next steps
- Create a Ruleset
- Manage Rulesets in Gen AI Builder
- Structures Explained
- Assistants Explained
- Retrievers Explained
- Knowledge Bases Explained
- AI Factory Concepts
- Hybrid Manager: Using Gen AI Builder
Rulesets ensure your AI behaves the way you want — with full governance, explainability, and auditability — powering trusted, production-grade AI experiences with EDB PG AI.
Start defining Rulesets for your Assistants today.
Could this page be better? Report a problem or suggest an addition!