Skip to main content
This feature is available on all Portkey plans.
You can capture this feedback on a request or conversation level and analyze it by adding meta data to the relevant request.

Adding Feedback to Requests

1. Find the `trace-id`

Portkey adds trace ids to all incoming requests. You can find this in the x-portkey-trace-id response header. To use your own trace IDs, send them as part of the request headers - Adding a trace ID to your requests

2. Add feedback

You can append feedback to a request through the SDKs or the REST API.
The Payload takes the following keys: trace_id, value, weight, metadata

Examples

A simple & effective feedback from the user is a thumbs up or thumbs down. Just set value to 1 for ๐Ÿ‘ and -1 for ๐Ÿ‘Ž. Weight would be default 1.0.

Other Ideas for collecting feedback

  • Business metrics make for great feedback. If youโ€™re generating an email, the email being sent out could be a positive feedback metric. The level of editing could indicate the value.
  • When a user retries a generation, store the negative feedback since something probably went wrong. Use a lower weight for this feedback since it could be circumstantial.

Feedback Analytics

You can see the Feedback Count and Value: Weight pairs for each trace-id on the logs page. You can also view the feedback details on Analytics and on the Prompt Eval tabs.

Portkey is now PRISMA AIRS AI Gateway. See it in action.

Contact Us
Last modified on August 3, 2026