Feedback
Last updated
Was this helpful?
Last updated
Was this helpful?
This feature is available on all Portkey plans.
Portkey's Feedback APIs provide a simple way to get weighted feedback from customers on any request you served, at any stage in your app.
You can capture this feedback on a request or conversation level and analyze it by adding meta data to the relevant request.
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 -
You can append feedback to a request through the SDKs or the REST API.
The Payload takes the following keys: traceID/trace_id, value, weight, metadata
trace_id
/ traceID
✅ Required
The trace id on which the feedback will be logged
string
value
✅ Required
Feedback value
integer
between [-10,10]
weight
❔ Optional
Add weight value to feedback value. Helpful if you're collecting multiple feedback for a single trace
float
between [0,1]
, Default = 1.0
metadata
❔ Optional
JSON string of any metadata you want to send along with the feedback.
_user
, _organisation
, _prompt
and _environment
are special fields indexed by default
string
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
.
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.
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 and on the Prompt Eval tabs.