v2

latestOpenAPI 3.1.02026-07-2670186350.6 KB
spans

Submit Span Feedback

Submit human feedback for a span.

This endpoint allows you to provide feedback (thumbs up/down) on a span's output. The feedback is stored on the associated generation and can trigger auto-save to the function's dataset based on the observer's configuration.

  • score=1.0: Positive feedback (thumbs up)
  • score=0.0: Negative feedback (thumbs down)
  • Intermediate values (e.g., 0.5) are supported for nuanced feedback
post/spans/{span_id}/feedback

Path parameters

span_idstring uuid required

The ID of the span to provide feedback on

The ID of the span to provide feedback on

Request body

scorenumber required

Feedback score (0.0=negative, 1.0=positive)

commentstring nullable

Optional comment explaining the feedback

save_to_datasetboolean nullable

Force save to dataset (True=force save, False=never save, None=use auto-save config)

Example request

{
  "score": 1,
  "comment": "Great output, exactly what I needed"
}

Response

Successful Response

span_idstring uuid required

The ID of the span

scorenumber required

The feedback score that was submitted

commentstring nullable

The feedback comment that was submitted

example_savedboolean required

Whether the example was saved to the dataset