Skip to content

Rank traces by human feedback and let dashboard users review them - #748

Draft
TonsOfFun wants to merge 1 commit into
mainfrom
feat/feedback-review-signals
Draft

TonsOfFun wants to merge 1 commit into
mainfrom
feat/feedback-review-signals

Conversation

@TonsOfFun

@TonsOfFun TonsOfFun commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Feedback shipped in 1.9.1 as end-user votes listed on an agent's Feedback tab. Nothing else read it: a trace did not show its own feedback, a dashboard user could not record their own judgement of a trace, and there was no way to find the interactions that went badly without reading traces one at a time.

This makes feedback a review signal. It is the first of two steps; the second uses these human labels to check an evaluation's judge against people and propose changes to its criteria, and is #757.

What changes

  • Feedback has a source. end_user (the default, and every existing row), implicit for something the reporting application observed (a regenerated answer, an abandoned reply, named by a free-form signal), and reviewer for a dashboard user's own mark. POST <mount>/api/feedback accepts source and signal; it refuses reviewer and cannot overwrite a review by reusing its feedback_id.
  • Dashboard users review traces. PUT / DELETE <mount>/api/traces/:id/review with the dashboard session. One review per user per trace. A trace's detail lists all its feedback and carries the Good / Bad controls with a note.
  • Needs attention. GET <mount>/api/feedback/attention ranks the traces in a window: 3 points per end-user thumbs down, 3 for a reviewer's bad mark, 2 per negative implicit signal, 2 for a failed trace. A trace a reviewer marked good is dropped. The listed traces are grouped by end user and session, read from the root span's user.id and session.id attributes (feedback's user_reference wins for the user). A collapsed panel at the top of the Traces page shows it, scoped to the agent on an agent's Traces tab.
  • Same report outside the browser: the traces_attention MCP tool and activeagent traces attention.
  • Trace listings and GET /api/traces/:id carry feedback: { positive, negative }. The agent Feedback tab filters by source.

Upgrading

Migration 036, add_interaction_feedback_sources, adds source, signal and reviewer_id. Deploy it before the updated dashboard: feedback ingest and the Needs attention panel need the columns.

Not in this PR

  • No new permission action. Any signed-in dashboard user who can see a trace can review it.
  • Reviews are written through the dashboard session only; there is no MCP tool or CLI command to write one.
  • No session_id or user_reference columns on traces. Grouping reads the root span of at most 200 ranked traces per report, and each report considers the 1,000 most recent negative feedback rows and the 1,000 most recent failed traces in its window.
  • The Traces list has no "has negative feedback" filter yet; the counts are in the payload for it.
  • The client-side call for submitting feedback from the telemetry SDK.

Validation

  • bin/test: 4741 runs, 0 failures, 5 errors. The 5 errors are RubyLLMIntegrationTest, which made live OpenAI calls with the local key and was refused for lack of credits; they do not touch this change.
  • bin/lint: no offenses.
  • npm test in actionagent/frontend: 792 pass. traceControlsViews.test.mjs now ignores the panel's request when it reads the view's trace queries.
  • The committed dashboard bundle is rebuilt.
  • In a browser against the dummy app with synthetic traces: Needs attention listed the flagged traces with their reasons, users and sessions, and a reviewer's Good mark with a note saved and showed on the trace.

Trying it

# an implicit signal on an ingested trace
curl "$DASHBOARD_URL/api/feedback" -H "Authorization: Bearer $TELEMETRY_API_KEY" -H 'Content-Type: application/json' \
  --data '{"feedback":{"trace_id":"trace-example","feedback_id":"regenerated-1","rating":"negative","source":"implicit","signal":"regenerated","user_reference":"user-example"}}'

activeagent traces attention --since 7d

Then open Traces, expand Needs attention, follow a trace and mark it under Your review. Guide: docs/framework/feedback.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PCEJHpjdek9evJw7V8o55G

Interaction feedback gains a source: an end user's vote, an implicit
signal the reporting application observed (named by `signal`), or a
dashboard user's own good/bad review of a trace.

- PUT/DELETE <mount>/api/traces/:id/review stores one review per
  dashboard user per trace. The ingest key cannot write or overwrite one.
- GET <mount>/api/feedback/attention ranks the traces in a window by
  negative feedback and failures, drops the ones a reviewer marked good,
  and groups them by end user and session (the root span's `user.id` and
  `session.id`). The same report is the `traces_attention` MCP tool and
  `activeagent traces attention`.
- The Traces page carries a Needs attention panel, and a trace's detail
  lists its feedback with the reviewer's controls.
- Trace listings carry each trace's feedback counts.

Migration 036 adds source, signal and reviewer_id to interaction
feedback.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PCEJHpjdek9evJw7V8o55G
@TonsOfFun
TonsOfFun force-pushed the feat/feedback-review-signals branch from 9a81877 to 3ed6153 Compare December 4, 2026 23:40

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant