This section describes the input format Iris Content Guard (ICG) accepts and the results it returns.
ICG accepts a list of messages. Each message has a role and content:
The role identifies who is speaking, and content contains the message text. Content must be a string; an empty string is allowed.
-
Messages with the user or assistant role are included in the conversation.
-
Messages with the thinking role are removed, so their contents are not passed to the model.
-
A system, developer, tool, function or any other unsupported role causes the entire classification request to fail with an error.
-
A user or assistant message with missing or non-string content causes the entire request to fail with an error.
-
Extra message fields, including reasoning_content, are removed before formatting and tokenization. The text in content is preserved.
Multi-turn conversations
Each call scores the final exchange: the last user message is the request, and the assistant message immediately after it, if provided, is the response. Earlier messages provide context for that exchange.
The conversation must contain at least one user message and at most one assistant message after the final user message. If either condition is not met, the request fails with an error.
Use our preprocessing helper to turn a chat/completions conversation into an ICG-compatible message list. It removes unsupported roles, fields and non-text content, and warns when information is removed.
Reading the results
ICG returns separate results for the request and response, with one harm probability per category:
-
request.category_harm_probabilities
-
response.category_harm_probabilities
If the final user request has no assistant reply after thinking messages are removed, response is null (None in Python).
All three integrations use the same fourteen category names and order for both the request and response. Each category has its own probability between 0 and 1. Several categories can score highly at once, and the values do not need to add up to 1. You choose the thresholds and actions that fit your application.
Conversation length and errors
The checkpoint’s default context limit is 32,768 tokens (32k), counting the full formatted conversation rather than just the exchange being scored. The effective limit depends on the model and serving-engine configuration. Requests that exceed that limit fail with an error; ICG never truncates the conversation to make it fit.
If the input cannot be scored or inference fails, you receive an exception or an HTTP error in the format used by your integration. A failed classification never produces placeholder scores. Last modified on November 30, 2026