Rule Types
Always Rules
Always Rules are automatically applied to every agent interaction within the space, regardless of the specific query or context. Use Cases:- Fundamental business definitions and context
- Consistent calculation methods
- Default analysis approaches
- Domain-specific terminology
Agent Requested Rules
Agent Requested rules are conditionally applied when the agent determines they are relevant to the current query or analysis. The agent intelligently selects which rules to use based on the context. Use Cases:- Specialized analysis techniques
- Context-specific guidance
- Advanced calculation methods
- Scenario-specific instructions
Best Practices
Rule Hierarchy and Organization
- Start with Always rules for fundamental business context
- Use Agent Requested rules for specialized scenarios
- Keep rules specific and actionable rather than vague
- Test rules with actual queries to ensure they work as expected
Writing Effective Rules
✅ Good Rule Examples:- “Customer churn rate should be calculated as customers lost / total customers at start of period”
- “When analyzing quarterly performance, always compare against same quarter previous year”
- “For financial analysis, use our fiscal year starting in October”
- “Be helpful” (too vague)
- “Always be accurate” (redundant)
- “Consider all factors” (too broad)
Domain-Specific Rules
E-commerce Example:Contextual Guidance
Rules should provide context that agents might not inherently understand about your business:Rule Conflicts and Resolution
How Cube Handles Conflicting Rules
Based on the rule configuration system, when multiple rules could apply to the same query, the conflict resolution strategy would likely include:- Rule type hierarchy (specific behavior needs verification)
- Rule specificity - more specific rules typically override general ones
- Rule order - the system may consider rule creation order or explicit priority
- Agent decision-making for complementary vs conflicting guidance
Example Conflict Scenarios
Scenario 1: Direct ContradictionBest Practices for Avoiding Conflicts
- Review existing rules before adding new ones
- Use specific triggers in Agent Requested rules
- Test rule combinations with sample queries
- Document rule intentions clearly
- Regular rule audits to identify and resolve conflicts
Current Limitations
Current State: Space-Level Rules Only, Always Rules Only
- Rules are currently configured at the Space level
- All agents within a space inherit the same set of rules
- Individual agent customization is not yet available
Getting Started
- Assess Your Use Case: Identify the key business context and calculations your agents need to understand
- Start Simple: Begin with 2-3 Always rules covering your most important business definitions
- Add Specificity: Implement Agent Requested rules for specialized scenarios
- Test and Iterate: Use real queries to validate rule effectiveness
- Scale Gradually: Add more rules based on actual usage patterns and feedback