How feedback data is used in Agent Insights
When users provide feedback on agent responses, Glean surfaces it in agent insights to help admins and agent editors diagnose problems, identify patterns, and improve agent quality. Glean masks feedback traces before displaying them to protect sensitive content.
Understand feedback data
The feedback available in Agent Insights depends on the workspace configuration and what the user submits. It can include:
- Upvotes and downvotes
- Structured reasons and optional comments
- Issue categories and subcategories for downvoted responses, when provided
- Relevant interaction context and masked trace-linked diagnostics
- Metadata needed to troubleshoot the related agent run
Authorized users can open individual feedback entries to review the available diagnostic context without seeing fields that Glean has excluded from the trace.
Use feedback to improve agents
Review feedback and diagnostics to:
- Identify agent instructions, logic, or tools that need changes.
- Find recurring quality issues across feedback entries or use cases.
- Check whether agent updates improve user feedback over time.
Attach API feedback to a trace
When you run agents through the Client REST API and collect feedback in your own application, include the run trace ID with each feedback event. Agent Insights displays only feedback linked to a trace. Glean records feedback without a trace ID, but hides it from the feedback drilldown.
- Run the agent using
POST /rest/api/v1/agents/runs/waitorPOST /rest/api/v1/agents/runs/stream. - Locate the target
GLEAN_AImessage (typically the final message in the run) and copy themessageTrackingTokenandtraceIdvalues. Glean returns atraceIdonly for traced runs. If this field is absent, you cannot link the feedback to a trace. - Send a
MANUAL_FEEDBACKevent toPOST /rest/api/v1/feedback. Set the required top-levelagentIdfield to the ID of the agent you ran. SettrackingTokensto a single-item array containing the tracking token, and include the trace ID inmanualFeedbackInfo.traceId. WithoutagentId, Glean doesn't save the trace ID with the feedback, so the entry won't appear in the Agent Insights drilldown:
{
"category": "CHAT",
"event": "MANUAL_FEEDBACK",
"agentId": "<agentId>",
"trackingTokens": ["<messageTrackingToken>"],
"manualFeedbackInfo": {
"vote": "DOWNVOTE",
"comments": "The answer used figures from last quarter.",
"traceId": "<traceId>"
}
}
Submit the feedback request using the credentials of the user who initiated the agent run. Agent editors can then view the entry in Agent Insights and inspect the corresponding masked trace.
Control access to feedback
Access to feedback-related data is strictly governed by role-based permissions. This information is typically visible to:
- Admins: For organization-wide quality oversight.
- Insights moderators: For performance monitoring and reporting.
- Agent builders: For specific agents they have created or manage.
Masked traces remain visible to all editors of the agent.
Privacy and data protection
Glean is built with enterprise-grade privacy standards to ensure your workspace interaction data and feedback are handled securely and responsibly.
Glean uses privacy first principles to safeguard sensitive details in user feedback. Before displaying feedback traces to workspace admins, Glean automatically masks trace data to hide restricted information.
How trace masking works
- PII scrubbing: Glean starts with a trace payload scrubbed of personally identifiable information (PII).
- Field removal: Glean strips out restricted fields from the displayed trace. This protects sensitive end-user input as well as proprietary Glean system prompts.
- Diagnostic retention: The remaining safe fields are displayed so Agent editors can effectively troubleshoot and improve response quality.
Masking strictly removes unauthorized fields from the trace view. It does not alter text values or rely on AI model redaction.
Additional privacy safeguards in agent insights
- Anonymization: Glean aggregates or anonymizes data points across insights views to reveal overarching trends without exposing individual user identities.
- Access control: Workspace admins control who can view agent insights, ensuring only authorized team members can access interaction data.
- User transparency: In-product notices inform end users about how their feedback is processed to improve agent performance.
Limitations
-
LLM-based masking, including LLM-as-judge redaction, is not supported.
-
Trace masking does not change feedback routing or feedback retention policies.
Understand user transparency
Before users submit feedback on an agent response, the feedback modal explains that Glean may share their chat and feedback with Glean, workspace admins, and the agent's builder to improve the experience. See User feedback for the disclosure and data-sharing guidance.
See also
- Agents insights for admins — open the organization-wide Agents insights dashboard
- Agents insights for agent builders — review usage, quality, and feedback for a specific agent
- Feedback data handling — review where feedback goes and what Glean receives