Skip to main content

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.

CodeSeverityDescriptionRemediation
OUTPUT.FORMAT.INVALID_JSON3Invalid JSON outputUse structured output parsing
OUTPUT.FORMAT.SCHEMA_VIOLATION4Output violates schemaValidate against output schema
OUTPUT.FORMAT.MALFORMED3Malformed output structureImplement output validation
OUTPUT.FORMAT.TRUNCATED2Output was truncatedHandle output length limits
OUTPUT.FORMAT.ENCODING2Output encoding issuesNormalize output encoding

QUALITY

Output quality failures.

CodeSeverityDescriptionRemediation
OUTPUT.QUALITY.INCOMPLETE3Incomplete responseValidate response completeness
OUTPUT.QUALITY.IRRELEVANT3Response is irrelevant to queryImprove response relevance
OUTPUT.QUALITY.VERBOSE2Overly verbose responseImplement response length optimization
OUTPUT.QUALITY.UNCLEAR2Unclear or ambiguous responseAdd clarity checks
OUTPUT.QUALITY.REPETITIVE2Repetitive content in responseDetect and reduce repetition

SAFETY

Output safety failures.

CodeSeverityDescriptionRemediation
OUTPUT.SAFETY.HARMFUL_CONTENT5Potentially harmful contentImplement content filtering
OUTPUT.SAFETY.PII_LEAK5PII leaked in outputImplement PII detection and masking
OUTPUT.SAFETY.BIAS4Biased content in outputImplement bias detection
OUTPUT.SAFETY.POLICY_VIOLATION4Output violates policyAdd policy compliance checks
OUTPUT.SAFETY.COPYRIGHT3Potential copyright violationImplement 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"]
}

Next Steps