Skip to main content

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.

  1. Run the agent using POST /rest/api/v1/agents/runs/wait or POST /rest/api/v1/agents/runs/stream.
  2. Locate the target GLEAN_AI message (typically the final message in the run) and copy the messageTrackingToken and traceId values. Glean returns a traceId only for traced runs. If this field is absent, you cannot link the feedback to a trace.
  3. Send a MANUAL_FEEDBACK event to POST /rest/api/v1/feedback. Set the required top-level agentId field to the ID of the agent you ran. Set trackingTokens to a single-item array containing the tracking token, and include the trace ID in manualFeedbackInfo.traceId. Without agentId, 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.
note

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​

  1. PII scrubbing: Glean starts with a trace payload scrubbed of personally identifiable information (PII).
  2. Field removal: Glean strips out restricted fields from the displayed trace. This protects sensitive end-user input as well as proprietary Glean system prompts.
  3. Diagnostic retention: The remaining safe fields are displayed so Agent editors can effectively troubleshoot and improve response quality.
note

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​