Skip to main content
Agent Control includes powerful evaluators out of the box.

Built-in Evaluators

EvaluatorNameDescription
RegexregexPattern matching using Google RE2 (safe from ReDoS)
ListlistFlexible keyword/value matching
JSONjsonJSON structure, type, and constraint validation
SQLsqlSQL query validation and restriction

Contributed Evaluators

EvaluatorNameDescription
Luna-2galileo.luna2AI-powered detection via Galileo

Regex Evaluator

Pattern matching using Google RE2 (safe from ReDoS attacks). Evaluator name: regex
OptionTypeRequiredDescription
patternstringYesRegular expression pattern (RE2 syntax)
flagslistNoOptional: ["IGNORECASE"]
// Block Social Security Numbers
{
  "name": "regex",
  "config": {
    "pattern": "\\b\\d{3}-\\d{2}-\\d{4}\\b"
  }
}

// Block credit card numbers (case-insensitive)
{
  "name": "regex",
  "config": {
    "pattern": "card.*\\d{4}[- ]?\\d{4}[- ]?\\d{4}[- ]?\\d{4}",
    "flags": ["IGNORECASE"]
  }
}

// Block AWS access keys
{
  "name": "regex",
  "config": {
    "pattern": "AKIA[0-9A-Z]{16}"
  }
}
Use cases: PII detection (SSN, credit cards, phone numbers), secret scanning (API keys, passwords), pattern-based blocklists.

List Evaluator

Flexible value matching with multiple modes and logic options. Evaluator name: list
OptionTypeDefaultDescription
valueslistrequiredValues to match against
logicstring"any""any" = match any value, "all" = match all
match_onstring"match""match" = trigger when found, "no_match" = trigger when NOT found
match_modestring"exact""exact" = full string match, "contains" = word-boundary match
case_sensitiveboolfalseCase sensitivity
match_mode="contains" uses word-boundary matching, not generic substring matching. For example, "admin" will match "admin user" but will NOT match "sysadministrator".
// Block admin/root keywords
{
  "name": "list",
  "config": {
    "values": ["admin", "root", "sudo", "superuser"],
    "logic": "any",
    "match_mode": "contains",
    "case_sensitive": false
  }
}

// Require approval keyword (trigger if NOT found)
{
  "name": "list",
  "config": {
    "values": ["APPROVED", "VERIFIED"],
    "match_on": "no_match",
    "logic": "any"
  }
}

// Allowlist: only permit specific tools
{
  "name": "list",
  "config": {
    "values": ["search", "calculate", "lookup"],
    "match_on": "no_match"
  }
}
Use cases: Keyword blocklists/allowlists, required terms validation, competitor mention detection, tool restriction lists.

Luna-2 Evaluator

AI-powered detection using Galileo’s Luna-2 small language models. Provides real-time, low-latency evaluation for complex patterns that can’t be caught with regex or lists. Evaluator name: galileo.luna2 Installation:
# Direct install
pip install agent-control-evaluator-galileo

# Or via convenience extra
pip install agent-control-evaluators[galileo]
Requirements: Set GALILEO_API_KEY environment variable where evaluations run.
OptionTypeDefaultDescription
metricstringMetric to evaluate (required if stage_type="local")
operatorstring"gt", "lt", "gte", "lte", "eq"
target_valuenumberThreshold value (0.0–1.0)
stage_typestring"local""local" or "central"
galileo_projectstringProject name for logging
on_errorstring"allow""allow" (fail open) or "deny" (fail closed)
timeout_msint10000Request timeout (1000–60000 ms)
Available metrics:
MetricDescription
input_toxicityToxic/harmful content in user input
output_toxicityToxic/harmful content in agent response
input_sexismSexist content in user input
output_sexismSexist content in agent response
prompt_injectionPrompt manipulation attempts
pii_detectionPersonally identifiable information
hallucinationPotentially false or fabricated statements
toneCommunication tone analysis
// Block toxic inputs (score > 0.5)
{
  "name": "galileo.luna2",
  "config": {
    "metric": "input_toxicity",
    "operator": "gt",
    "target_value": 0.5,
    "galileo_project": "my-project"
  }
}

// Block prompt injection attempts
{
  "name": "galileo.luna2",
  "config": {
    "metric": "prompt_injection",
    "operator": "gt",
    "target_value": 0.7,
    "on_error": "deny"
  }
}

// Flag potential hallucinations (warn but allow)
{
  "name": "galileo.luna2",
  "config": {
    "metric": "hallucination",
    "operator": "gt",
    "target_value": 0.6
  }
}