POST /feedback
The /feedback
endpoint assigns feedback to a particular inference or episode.
Each feedback is associated with a metric that is defined in the configuration file.
Request
dryrun
- Type: boolean
- Required: no
true
, the feedback request will be executed but won’t be stored to the database (i.e. no-op).
This field is primarily for debugging and testing, and you should ignore it in production.
episode_id
- Type: UUID
- Required: when the metric level is
episode
episode
.
Only use episode IDs that were returned by the TensorZero gateway.
inference_id
- Type: UUID
- Required: when the metric level is
inference
inference
.
Only use inference IDs that were returned by the TensorZero gateway.
metric_name
- Type: string
- Required: yes
[metrics.draft_accepted]
in your configuration file, then you would set metric_name: "draft_accepted"
.
The metric names comment
and demonstration
are reserved for special types of feedback.
A comment
is free-form text (string) that can be assigned to either an inference or an episode.
The demonstration
metric accepts values that would be a valid output.
See Metrics & Feedback for more details.
tags
- Type: flat JSON object with string keys and values
- Required: no
{"user_id": "123"}
or {"author": "Alice"}
.
value
- Type: varies
- Required: yes
type = "boolean"
).
Response
feedback_id
- Type: UUID
Examples
Inference-Level Boolean Metric
Inference-Level Boolean Metric
Inference-Level Boolean Metric
Configuration
Request
POST /feedback
Response
POST /feedback
Episode-Level Float Metric
Episode-Level Float Metric
Episode-Level Float Metric
Configuration
Request
POST /feedback
Response
POST /feedback