Skip to content

User feedback: ratings from your app's users

Your users’ ratings are one of the best signals of whether an AI answer was any good. Send them to Shield360 with the trace that produced the answer, and you can see the worst-rated answers, compare releases and compare feature-flag variants.

import Shield360 from "shield360";
// While handling the request, keep the trace id with the answer.
const traceId = Shield360.getCurrentTraceId();
// Later, when the user rates it:
await Shield360.feedback({ traceId, score: 1 }); // thumbs up
await Shield360.feedback({ traceId, score: 4, scale: "stars", comment: "Close, but missed one item" });

feedback returns true or false and never throws.

FieldMeaning
traceId (required), spanIdThe answer being rated
score (required)1 or -1 for thumbs up or down, or 1 to 5 with scale: "stars". A 1 with no scale is a thumbs up.
commentWhat the user wrote
userId, tenantIdWho rated it, and their customer
metadata, app, release, feedbackIdExtra context. Sending the same feedbackId again replaces the rating.

The endpoint takes only an environment API key, bodies up to 16 KB, and is rate-limited per key.

  • Build → Telemetry → Feedback shows scores by day, the worst-rated traces, scores by release and scores by feature-flag variant.
  • Each trace has a Feedback tab with its ratings and comments.
  • The release regression report compares feedback scores between releases.
  • Comments are stored only if your organization stores free text. They are cleaned of secrets and masked for personal data first. Otherwise they are dropped.
  • userId and tenantId are stored only as a keyed hash, never as sent.
  • Metadata is always masked.
  • Ratings are kept for 400 days, and comments for 90 days.

Viewing scores needs View telemetry. Reading comments on a trace needs View a request’s contents.