Metadata Levels
White Circle supports metadata at two levels:Session-Level Metadata
Add context about the session or environment at the request level:Session Fields
Environment Fields
Theenvironment object accepts any key-value pairs for custom context:
Message-Level Metadata
Attach metadata to individual messages to provide context about who sent them and when:User Metadata
Attach user information to messages withrole: "user":
User metadata powers Risk Scoring. Include at least one stable identifier in
metadata.user (id or email) to track policy violations per user over time, and optionally include ip as supplemental context since IP addresses can change.Assistant Metadata
Attach AI response details to messages withrole: "assistant":
This data enables performance analytics in the White Circle dashboard.
Message Metadata
Attach identifiers and timestamps to any message:Full Example
Use Cases
Risk Scoring
Include
user.id, user.email, or user.ip to enable risk scoring. White Circle aggregates violations per user to detect high-risk accounts.Audit Trails
Include
message.id and message.timestamp for detailed logging and compliance.Analytics
Include
environment data to segment moderation results by app version, platform, or feature.Best Practices
Always include a user identifier for risk scoring
Always include a user identifier for risk scoring
To use Risk Scoring, include at least one identifier in your message metadata (
user.id, user.email, or user.ip):Use consistent identifiers
Use consistent identifiers
Always use the same
user.id and normalized user.email for the same user across requests. Use user.ip as supplemental context, because IPs can change. Inconsistent identifiers create separate profiles and fragment risk scoring data.Track AI model performance
Track AI model performance
If you use multiple AI models, track their performance:This data appears in your White Circle dashboard for analysis.
