Set up the Text Matcher evaluator
Open Evaluate from your prompt
Open the prompt you want to test and click Evaluate in the prompt header.

Configure matching rules
Give the evaluator a name, link a dataset, and define the text matching rules.
Choose from the following match types:

| Match type | Behavior |
|---|---|
| equals | The response must match your text exactly. |
| starts-with | The response must begin with your specified text. |
| ends-with | The response must conclude with your specified text. |
| contains-any | The response must include at least one item from your array of strings. |
| contains-all | The response must include every item from your array of strings. |
| not-contains-any | The response must not include any item from your array of strings. |
| regex | The response must match your regular expression pattern. |
Examples
Find SEO-oriented keywords
Usecontains-all or contains-any to ensure responses include target keywords:

Ensure the response begins with a specific phrase
Usestarts-with to enforce a consistent response opening:

Ensure the response does not contain personal information
Usenot-contains-any to detect and flag responses that leak sensitive data:

Validate format with regex
Useregex to enforce structural patterns (e.g., lowercase letters and numbers only):

When to use
- Keyword enforcement — Ensure required terms or phrases appear in responses (SEO, compliance, branding).
- Content safety — Block responses containing banned words, personal information, or inappropriate content.
- Format validation — Check that responses follow a specific format (e.g., starts with a greeting, ends with a call to action).
- Simple pattern checks — Validate output structure with regex (email patterns, phone numbers, structured IDs).
Next steps
JavaScript Evaluator
Write custom code for more complex validation.
LLM-as-a-Judge
Use an LLM for qualitative assessment.

