Skip to main content
Context merging allows you to send only the new messages rather than the entire history every time. White Circle automatically combines your new messages with previously submitted content. This reduces payload size, simplifies your code, and ensures consistent moderation across the full context.

How It Works

1

First Request

Send the initial messages with an external_session_id:
White Circle stores these messages associated with conversation-123.
2

Subsequent Requests

For new messages, send only the new content with include_context: true:
White Circle automatically prepends the previous messages before analyzing.
3

White Circle Sees the Full Context

When analyzing the second request, White Circle evaluates this combined content:
Only the last message in the combined array is checked for policy violations and metrics. The previous messages provide context for the evaluation but are not themselves checked.

Requirements

Context merging requires an external_session_id. Without it, White Circle cannot identify which previous messages to merge.

Default Behavior

When to Use Context Merging

As new content is generated, send each new exchange with include_context: true. White Circle maintains the full context for accurate policy evaluation.This is especially important for detecting:
  • Multi-turn jailbreak attempts where users gradually push boundaries
  • Context-dependent violations that only make sense with history
  • Patterns of behavior across the session
For long sessions, sending the full history every time can be expensive and slow. With context merging:
  • You send only new messages
  • Requests are smaller and faster
  • White Circle handles the history

Disabling Context Merging

If you want to check messages in isolation (without previous context), explicitly set include_context: false:
If you always want independent checks (no merging), explicitly set include_context: false.

Comparison: With and Without Context Merging

Request 1:
Request 2:
✅ White Circle analyzes all 4 messages together