Get the per-trace remediation diff for a control action
Returns a comparison of the original LLM span against the
remediated span produced by a retry control action — token
length delta, latency delta, Claude-rated similarity, and
per-rule eval score deltas. Lazy-computed on first GET and
cached for subsequent requests. TRU-363.
Status codes:
- 200 — diff available (cached or just computed)
- 202 —
evaluation_incomplete: caller should poll - 404 — action not found / cross-tenant
- 422 —
no_remediated_span: action type cannot produce a diff (currentlyfallback_modelandprompt_modification)
Authorizations
SDK API key (tl_...) or Clerk session JWT
Path Parameters
Response
Remediation diff
Per-trace remediation diff for a retry control action. Lazy-
computed on first GET and cached. embedding_similarity is a
0..1 score from a Claude similarity rating, with the sentinel
-1.0 when the rater call failed. TRU-363.
remediated_tokens - original_tokens (sum of prompt + completion).
remediated_latency_ms - original_latency_ms.
0..1 similarity, or -1.0 when the rater call failed.
citations_per_1k_chars(remediated) - citations_per_1k_chars(original). Null for diffs computed before TRU-373 (column nullable, no backfill) and when both outputs are empty. TRU-373.