OUTPUT
Response generation failures.
Held for the beta
This feature is built. It is not available in this release. It has no release date. This page describes it as designed.
The SDK assigns these 4 codes of this page today: OUTPUT.FORMAT.SCHEMA_VIOLATION (a validation error, for example the ValidationError of Pydantic), OUTPUT.FORMAT.TRUNCATED (a model stream that was cut; in Python with openai 3.x, a cut stream gets TOOL.EXECUTION.DEPENDENCY_FAILED), OUTPUT.SAFETY.PII_LEAK and OUTPUT.SAFETY.POLICY_VIOLATION (a guardrail tripwire, or a provider error that names a content filter). The diagnosis pipeline, which is held, uses the other codes. What the SDK assigns today lists all 23.
The OUTPUT module covers errors in generating and delivering agent responses. This includes structural formatting, response quality, and safety concerns.
Categories
FORMAT
Output formatting failures.
| Code | Severity | Description | Remediation |
|---|---|---|---|
OUTPUT.FORMAT.INVALID_JSON | 3 | Invalid JSON output | Use structured output parsing |
OUTPUT.FORMAT.SCHEMA_VIOLATION | 4 | Output violates schema | Validate against output schema |
OUTPUT.FORMAT.MALFORMED | 3 | Malformed output structure | Implement output validation |
OUTPUT.FORMAT.TRUNCATED | 2 | Output was truncated | Handle output length limits |
OUTPUT.FORMAT.ENCODING | 2 | Output encoding issues | Normalize output encoding |
QUALITY
Output quality failures.
| Code | Severity | Description | Remediation |
|---|---|---|---|
OUTPUT.QUALITY.INCOMPLETE | 3 | Incomplete response | Validate response completeness |
OUTPUT.QUALITY.IRRELEVANT | 3 | Response is irrelevant to query | Improve response relevance |
OUTPUT.QUALITY.VERBOSE | 2 | Overly verbose response | Implement response length optimization |
OUTPUT.QUALITY.UNCLEAR | 2 | Unclear or ambiguous response | Add clarity checks |
OUTPUT.QUALITY.REPETITIVE | 2 | Repetitive content in response | Detect and reduce repetition |
SAFETY
Output safety failures.
| Code | Severity | Description | Remediation |
|---|---|---|---|
OUTPUT.SAFETY.HARMFUL_CONTENT | 5 | Potentially harmful content | Implement content filtering |
OUTPUT.SAFETY.PII_LEAK | 5 | PII leaked in output | Implement PII detection and masking |
OUTPUT.SAFETY.BIAS | 4 | Biased content in output | Implement bias detection |
OUTPUT.SAFETY.POLICY_VIOLATION | 4 | Output violates policy | Add policy compliance checks |
OUTPUT.SAFETY.COPYRIGHT | 3 | Potential copyright violation | Implement copyright checks |
Danger
OUTPUT.SAFETY.HARMFUL_CONTENT and OUTPUT.SAFETY.PII_LEAK are both severity 5. Treat them as blocking issues in your application. Risicare records and classifies them, but it does not block a response. An alert rule can watch one code with a filter such as error_code:OUTPUT.SAFETY.PII_LEAK. See Alerts.
Example Diagnosis
{
"error_code": "OUTPUT.FORMAT.SCHEMA_VIOLATION",
"confidence": 0.88,
"root_cause": "Agent returned a string where the downstream consumer expected a JSON object with 'result' and 'status' fields.",
"suggested_fixes": ["prompt", "guard"]
}