Skip to main content

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.

note

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 TypeApplied Guardrails
Generate DescriptionSexual Content, Hate Speech, Insults, Misconduct
SummarizationSexual Content, Hate Speech, Insults, Misconduct
ClassificationSexual Content, Hate Speech, Insults, Misconduct
Named Entity ExtractionSexual Content, Hate Speech, Insults, Misconduct
Metadata ExtractionSexual Content, Hate Speech, Insults, Misconduct
Classify Image into CategoriesSexual Content, Hate Speech, Insults, Misconduct
Generate Image DescriptionSexual Content, Hate Speech, Insults, Misconduct
Generate and Match Image MetadataSexual Content, Hate Speech, Insults, Misconduct
Detect Entities in ImagesSexual Content, Hate Speech, Insults, Misconduct
Extract Entities from TextSexual Content, Hate Speech, Insults, Misconduct
Classify Text into CategoriesSexual Content, Hate Speech, Insults, Misconduct
Generate and Match Text MetadataSexual Content, Hate Speech, Insults, Misconduct
Generate Text SummarySexual 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 TypeInjection Vectors
Summarizationinstructions
Generate Image Descriptioninstructions
Extract Entities from Textinstructions
Detect Entities in Imagesinstructions
Classify Text into Categoriesinstructions, classes
Generate and Match Text Metadatainstructions, kSimilarMetadata
Classify Image into Categoriesinstructions, classes
Generate and Match Image Metadatainstructions, 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
}