feedback_key
(see Feedback).
When you make an inference request, the API response includes a completion_id
UUID along with the
model’s output (see Make inference requests to learn more). You must log your feedback
for an output using its completion_id.
Make sure to use the response’s
completion_id
for logging, not its id
.completion_id
for a Chat API response as follows:
stream=True
to the Chat API to stream completions, you can find the same completion_id
in each streamed chunk as follows:
Adaptive SDK / OpenAI Python
Log metric feedback
Metric feedback allows you to score a completion with scalar or boolean values. For example, the code snippet below logs that Llama3.1 8B’s completion to your prompt scored aCSAT
(customer satisfaction score) of 5.
Create an
Adaptive
client firstdetails
for more context or justification on the provided feedback.
See the SDK Reference to see the full method definition.
Log preference feedback
Preference feedback allows you to log a pairwise comparison between 2 completions. You can also log a tie between the 2, as equally good or equally bad.Adaptive SDK