dataTamer logodataTamer
Back to Tutorials
Intermediate20 min read

Setting Up Rules & Alerts

Create LLM-powered rules for data extraction, classification, and real-time stream alerts.

What You'll Learn

Understanding datasource rules
Creating LLM-powered extraction rules
Setting up real-time stream alerts
Configuring alert severity levels
Monitoring and managing rules

What Are Datasource Rules?

Datasource rules are LLM-powered instructions that automatically process and analyze your data. They enable:

  • Data Extraction: Pull specific information from unstructured data
  • Classification: Categorize data into predefined groups
  • Sentiment Analysis: Determine positive, negative, or neutral sentiment
  • Entity Recognition: Identify people, places, organizations, dates
  • Custom Analysis: Any analysis you can describe in natural language
1

Navigate to Your Tamed Data

  1. 1. Go to Datasources in the left sidebar
  2. 2. Click on a datasource that has tamed data created
  3. 3. Navigate to the "Tamed Data" section
  4. 4. Click on your tamed data entry
2

Create a New Rule

On the tamed data detail page:

  1. 1. Find and click on the "Rules" tab
  2. 2. Click "Create New Rule"
  3. 3. Give your rule a descriptive name (e.g., "Extract Customer Complaints")
  4. 4. Select the rule type (Extraction, Classification, Sentiment, or Custom)
3

Define Your Rule Prompt

Describe what the LLM should do in natural language. Examples:

Extraction Rule:

"Extract the product name and issue description from support tickets. Return as JSON with keys: product_name, issue_description"

Classification Rule:

"Classify this document as High, Medium, or Low urgency based on language and keywords. Return only the category name."

Sentiment Analysis:

"Analyze the sentiment of this customer feedback. Return one of: POSITIVE, NEGATIVE, NEUTRAL"

4

Test Your Rule

  1. 1. Use the "Test Rule" feature
  2. 2. Provide sample input data
  3. 3. Review the LLM's output
  4. 4. Refine your prompt if needed
  5. 5. Save the rule when satisfied

💡 Pro Tip: Write clear, specific prompts. Include examples of expected output format for better results.

5

Setting Up Stream Alerts

Stream alerts notify you when specific conditions are met in real-time data:

  1. 1. Navigate to your tamed data detail page
  2. 2. Click on the "Stream Alerts" tab
  3. 3. Click "Create New Alert"
  4. 4. Give your alert a descriptive name
6

Configure Alert Conditions

Define when the alert should fire:

  • Trigger Condition: Based on rule output, keywords, or patterns
  • Severity Level: Critical, Warning, or Info
  • Alert Actions: Dashboard notification, email, or webhook
  • Frequency: Immediate, digest (hourly/daily), or threshold-based

⚠️ Avoid Alert Fatigue: Use digest mode or thresholds for high-volume streams to prevent overwhelming notifications.

7

Monitor and Manage

Track your rules and alerts performance:

  • View Rule Execution History: Check success rate and average execution time
  • View Alert History: Filter by severity, date range, or alert type
  • Optimize Performance: Refine prompts for better accuracy
  • Monitor Costs: Track AI credits consumed by rules

Next Steps

Excellent! You now know how to automate data analysis with rules. Ready to integrate dataTamer into your applications?