Explore supported metrics and operators in Galileo Protect to configure precise rulesets and enhance AI application monitoring and decision-making.
gp.RuleMetrics.prompt_injection
input
Potential Categories:
Operator | Target Value |
---|---|
Any (gp.RuleOperator.any ) | A list of categories (e.g. [“obfuscation”, “impersonation”]) |
All (gp.RuleOperator.all ) | A list of categories (e.g. [“obfuscation”, “impersonation”]) |
Contains (gp.RuleOperator.contains ) | A single category (e.g. “impersonation”) |
Equal (gp.RuleOperator.eq ) | A single category (e.g. “impersonation”) |
Not equal (gp.RuleOperator.neq ) | A single category (e.g. “impersonation”) |
Empty (gp.RuleOperator.empty ) | - |
Not Empty (gp.RuleOperator.not_empty ) | - |
gp.RuleMetrics.pii
for output PII
gp.RuleMetrics.input_pii
for input PII
input
(for input PII) or output
(for output PII)
Potential Categories:
Operator | Target Value |
---|---|
Any (gp.RuleOperator.any ) | A list of categories (e.g. [“ssn”, “address”]) |
All (gp.RuleOperator.all ) | A list of categories (e.g. [“ssn”, “address”]) |
Contains (gp.RuleOperator.contains ) | A single category (e.g. “ssn”) |
Equal (gp.RuleOperator.eq ) | A single category (e.g. “ssn”) |
Not equal (gp.RuleOperator.neq ) | A single category (e.g. “ssn”) |
Empty (gp.RuleOperator.empty ) | - |
Not Empty (gp.RuleOperator.not_empty ) | - |
gp.RuleMetrics.context_adherence_luna
Payload Field: Both input
and output
must be included in the payload
Potential Values: 0.00 to 1.00.
Generally, we see 0.1 as a good threshold below which we’re confident the response is not adhering to the context.
Operators Supported:
gp.RuleOperator.gt
)
gp.RuleOperator.lt
)
gp.RuleOperator.gte
)
gp.RuleOperator.lte
)
gp.RuleMetrics.toxicity
for output Toxicity
gp.RuleMetrics.input_toxicity
for input Toxicity
input
or output
Potential Values: 0.00 to 1.00 (higher values indicate higher toxicity)
Operators Supported:
gp.RuleOperator.gt
)
gp.RuleOperator.lt
)
gp.RuleOperator.gte
)
gp.RuleOperator.lte
)
gp.RuleMetrics.sexist
for output Sexism
gp.RuleMetrics.input_sexist
for input Sexism
input
or output
Potential Values: 0.00 to 1.00 (higher values indicate higher toxicity)
Operators Supported:
gp.RuleOperator.gt
)
gp.RuleOperator.lt
)
gp.RuleOperator.gte
)
gp.RuleOperator.lte
)
gp.RuleMetrics.tone
for output Tone
gp.RuleMetrics.input_tone
for input Tone
input
(for input Tone) or output
(for output Tone)
Potential Categories:
Operator | Target Value |
---|---|
Equal (gp.RuleOperator.eq ) | A single category (e.g. “anger”) |
Not equal (gp.RuleOperator.neq ) | A single category (e.g. “neutral”) |