Guardrails
Guardrails are AI safety controls that prevent the Context API from generating harmful, offensive, or inappropriate content. This page explains which actions are covered by guardrails, what types of content trigger violations, and what a guardrail error response looks like.
Understanding Guardrails in Knowledge Enrichment
To help ensure safe and responsible use of AI, the Hyland AI Platform has introduced guardrails in the Knowledge Enrichment service. These guardrails are designed to protect users from generating or receiving harmful, offensive, or inappropriate content.
Guardrails are built-in safety mechanisms that monitor and restrict certain types of content. They help prevent the generation of responses that may include:
- Sexual content
- Hate speech
- Insults
- Misconduct
These protections apply automatically to most available actions, such as summarizing text, classifying content, or generating descriptions.
Generating embeddings is not covered by guardrails.
Importance of Guardrails
Guardrails help maintain a respectful and safe environment for all users. They ensure that the AI behaves responsibly and aligns with community standards. If a request violates these guardrails, the system blocks the response and notifies the user.
Overview of Guardrail Configuration
The following table outlines the recommended guardrail levels for each task within Knowledge Enrichment:
| Task Type | Applied Guardrails |
|---|---|
| Generate Description | Sexual Content, Hate Speech, Insults, Misconduct |
| Summarization | Sexual Content, Hate Speech, Insults, Misconduct |
| Classification | Sexual Content, Hate Speech, Insults, Misconduct |
| Named Entity Extraction | Sexual Content, Hate Speech, Insults, Misconduct |
| Metadata Extraction | Sexual Content, Hate Speech, Insults, Misconduct |
| Classify Image into Categories | Sexual Content, Hate Speech, Insults, Misconduct |
| Generate Image Description | Sexual Content, Hate Speech, Insults, Misconduct |
| Generate and Match Image Metadata | Sexual Content, Hate Speech, Insults, Misconduct |
| Detect Entities in Images | Sexual Content, Hate Speech, Insults, Misconduct |
| Extract Entities from Text | Sexual Content, Hate Speech, Insults, Misconduct |
| Classify Text into Categories | Sexual Content, Hate Speech, Insults, Misconduct |
| Generate and Match Text Metadata | Sexual Content, Hate Speech, Insults, Misconduct |
| Generate Text Summary | Sexual Content, Hate Speech, Insults, Misconduct |
| Generate Image Embeddings | ❌ Not Covered |
| Generate Text Embeddings from Documents | ❌ Not Covered |
Prompt Injection Guardrails
In addition to content-safety guardrails, Knowledge Enrichment runs prompt injection guardrails on select actions. These guardrails inspect user-supplied inputs, such as instructions and other free-text parameters, for attempts to override or manipulate the underlying AI prompt. If an injection attempt is detected, the guardrails block the request.
The following table lists the actions with active prompt injection guardrails and the specific input fields (injection vectors) they monitor:
| Task Type | Injection Vectors |
|---|---|
| Summarization | instructions |
| Generate Image Description | instructions |
| Extract Entities from Text | instructions |
| Detect Entities in Images | instructions |
| Classify Text into Categories | instructions, classes |
| Generate and Match Text Metadata | instructions, kSimilarMetadata |
| Classify Image into Categories | instructions, classes |
| Generate and Match Image Metadata | instructions, kSimilarMetadata |
Impact of a Blocked Request
If your request triggers a guardrail, you may receive an error message like the one below. This means the system detected potentially unsafe content and stopped processing the request.
Guardrail Error Types
When a guardrail violation occurs during processing, the Context API returns an error in the action-specific result field. The error indicates that content triggered safety controls and processing was blocked.
GuardrailBlockedException
The GuardrailBlockedException error occurs when input or output content violates configured safety guardrails. This is a processing-level exception that prevents the action from completing.
Common causes:
- Input document contains content that violates guardrails (sexual content, hate speech, insults, misconduct).
- Generated output would violate guardrails.
- Instruction text includes prohibited content.
Resolution:
- Review the input document and remove or rephrase problematic content.
- Modify instruction text to avoid triggering guardrails.
- Contact support if the content appears to be blocked incorrectly.
Example: Guardrail Violation Error Response
The following is an example of an error response when a request is blocked due to guardrail violations:
{
"id": "result_id",
"timestamp": "2026-05-25T14:00:00Z",
"results": [
{
"objectKey": "documents/sample.pdf",
"imageDescription": null,
"imageMetadata": null,
"textMetadata": null,
"textSummary": {
"isSuccess": false,
"result": null,
"error": {
"errorType": "GuardrailViolation",
"message": "Processing for task text:summarization failed: ProcessingError (GuardrailBlockedException): This request triggered our default guardrails. To continue, please rephrase and submit again, or reach out to our support team for assistance."
}
},
"textClassification": null,
"imageClassification": null,
"textEmbeddings": null,
"imageEmbeddings": null,
"generalProcessingErrors": null,
"namedEntityText": null,
"namedEntityImage": null
}
],
"status": "FAILURE",
"inProgress": false
}