common.skipToContent

AI Entity Creation

Create custom detection patterns using AI assistance

When built-in entities don't cover your needs, use AI to generate custom detection patterns. Describe what you want to detect in plain language, and AI creates the regex pattern for you.

Plan Requirement

AI Entity Creation is available on Basic plan and above. Free plan users can create custom entities manually using regex patterns.


How It Works

1

Describe Your Pattern

Tell AI what you want to detect in plain language

2

AI Generates Pattern

AI creates a regex pattern based on your description

3

Test & Refine

Test the pattern with sample text and adjust if needed

4

Save & Use

Save your custom entity for use in analysis


Creating an AI Entity

Step 1: Open Custom Entities

  1. Go to Settings → Custom Entities
  2. Click Create New Entity
  3. Select AI-Assisted mode

Step 2: Describe Your Pattern

Enter a clear description of what you want to detect. Be specific about the format.

Good Examples

  • "Employee IDs in the format EMP-12345 where 12345 is a 5-digit number"
  • "Order numbers starting with ORD followed by 8 digits, like ORD12345678"
  • "German postal codes - 5 digit numbers between 01000 and 99999"
  • "Internal project codes: 3 uppercase letters, a dash, and 4 digits (e.g., ABC-1234)"

Avoid Vague Descriptions

  • "ID numbers" - Too vague, what format?
  • "Customer data" - What specific pattern?
  • "Codes" - Need more specifics about format

Step 3: Review Generated Pattern

AI generates a regex pattern based on your description. Review it:

// For "Employee IDs: EMP-12345"

EMP-\d{5}

Step 4: Test the Pattern

  1. Enter sample text in the test area
  2. Click Test Pattern
  3. Verify that matches are highlighted correctly
  4. Check for false positives and false negatives

Step 5: Save the Entity

  1. Enter a name for your entity (e.g., EMPLOYEE_ID)
  2. Add an optional description
  3. Choose a category (Personal, Technical, Custom, etc.)
  4. Click Save Entity

Token Cost

50 tokensper AI entity creation

This is a fixed cost regardless of pattern complexity. Manual regex entry is free.

To minimize costs:

  • Be as specific as possible in your first description
  • Use manual regex if you already know the pattern
  • Test thoroughly before saving to avoid recreating

Manual Regex Creation

If you know regex, you can create custom entities manually without using tokens:

  1. Go to Settings → Custom Entities
  2. Click Create New Entity
  3. Select Manual mode
  4. Enter your regex pattern directly
  5. Test and save

Regex Tips

PatternMeaningExample Match
\dAny digit (0-9)5
\d{3}Exactly 3 digits123
[A-Z]Uppercase letterA
[A-Z]{3}3 uppercase lettersABC
\wLetter, digit, or underscorea, 1, _
-Literal dash-
?Optional (0 or 1)
+One or more
*Zero or more

Example Patterns

Employee ID (EMP-12345)

EMP-\d{5}

Order Number (ORD12345678)

ORD\d{8}

Project Code (ABC-1234)

[A-Z]{3}-\d{4}

License Plate (ABC 123 or ABC-123)

[A-Z]{3}[\s-]?\d{3}


Using Custom Entities

Once created, custom entities work like built-in entities:

In the Analyzer

  1. Open the entity selection panel
  2. Find your custom entity under the Custom category
  3. Check the box to include it in detection
  4. Run analysis as normal

In Presets

  1. Create or edit a preset
  2. Select your custom entity from the entity list
  3. Save the preset

Tip

Custom entities are displayed with a "Custom" badge to distinguish them from built-in entities.


Managing Custom Entities

Editing an Entity

  1. Go to Settings → Custom Entities
  2. Find your entity and click Edit
  3. Modify the name, description, or pattern
  4. Test the updated pattern
  5. Save changes

Deleting an Entity

  1. Go to Settings → Custom Entities
  2. Find your entity and click Delete
  3. Confirm deletion

Note

Deleting a custom entity removes it from all presets that use it. The presets will still work but won't detect that entity type.


Best Practices

Be specific in your AI descriptions - include format details and examples
Test patterns with edge cases before saving
Use meaningful names like CUSTOMER_ORDER_ID instead of ID1
Add descriptions to help remember what each entity detects
Use manual regex if you're comfortable with it - saves tokens
Group related custom entities in the same preset for easy management

Related Documentation

Last Updated: February 2026