Completion Feedback
Attach structured feedback to a specific LLM completion to power prompt optimization.sendFeedback()
| Parameter | Type | Required | Description |
|---|---|---|---|
promptSlug | string | Yes | Prompt name (same as ze.prompt({ name: ... })) |
completionId | string | Yes | UUID of the completion span |
thumbsUp | boolean | Yes | Positive or negative feedback |
reason | string | No | Explanation of the feedback |
expectedOutput | string | No | What the output should have been |
metadata | Record<string, unknown> | No | Additional metadata |
judgeId | string | No | Judge automation ID (for judge feedback) |
expectedScore | number | No | Expected score (for scored judges) |
scoreDirection | 'too_high' | 'too_low' | No | Score direction for scored judges |