The content gate catches two failure modes that other gates cannot: an agent that returns nothing at all, and an agent that responds with a refusal rather than completing its assigned task. Both are treated as gate failures because they represent output that will not satisfy the user, even if the output is structurally valid. Both checks are enabled by default and can be turned off independently.Documentation Index
Fetch the complete documentation index at: https://docs.pecta.ai/llms.txt
Use this file to discover all available pages before exploring further.
Usage
Empty output detection
The gate considersctx.output empty if it is any of the following:
undefinedornull- A string containing only whitespace (or an empty string)
- An empty array (
[]) - An object with no own keys (
{})
false, 0, or a non-empty string — is treated as non-empty.
AI refusal phrase detection
The gate scans every string inctx.output for phrases that indicate the model is declining to fulfill the request rather than producing useful output. The following patterns are matched case-insensitively:
| Pattern | Example phrase |
|---|---|
i don't have access / i do not have access | ”I don’t have access to real-time data.” |
i don't have the ability / i do not have the ability | ”I don’t have the ability to browse the web.” |
i can't do / i cannot do | ”I cannot do that.” |
i can't help / i cannot help | ”I can’t help with this request.” |
i can't provide / i cannot provide | ”I cannot provide personal advice.” |
i can't access / i cannot access | ”I can’t access external systems.” |
i can't complete / i cannot complete | ”I cannot complete this task.” |
i can't fulfill / i cannot fulfill | ”I can’t fulfill that request.” |
i can't assist / i cannot assist | ”I cannot assist with that.” |
as an ai language model | ”As an AI language model, I…” |
as an ai model | ”As an AI model, I…” |
i'm an ai / i am an ai / i'm just an ai | ”I’m just an AI.” |
passed: false on the first match it finds. It does not enumerate all matching phrases.
What a failure looks like
Configuration
Fail evaluations where
ctx.output is empty, whitespace-only, an empty array, or an empty object. Defaults to true.Fail evaluations where any string in
ctx.output matches a known AI refusal or disclaimer phrase. Defaults to true.Override the gate name recorded in results. Defaults to
"content".