Skip to content

feat(feedback): thumbs up/down on answers (MCP + chat) with an answer_log table - #1162

Draft
northdpole wants to merge 9 commits into
feat/ingest-comprehensionfrom
feat/answer-feedback
Draft

northdpole wants to merge 9 commits into
feat/ingest-comprehensionfrom
feat/answer-feedback

Conversation

@northdpole

Copy link
Copy Markdown
Collaborator

Adds thumbs up/down on answers so staging can collect labelled data.

  • answer_log table (+ migration d1e2f3a4b5c6, which joins the two existing heads) and recording of ratings.
  • MCP: ask returns an answer_id; new rate_answer tool.
  • Chat: completion returns answer_id; POST /rest/v1/answer_feedback; GET /admin/feedback. Chat answers are logged only when a deployment opts in (ANSWER_LOG_CHAT=1).
  • Chat UI: thumbs under answers, storage notice when answers are logged, and the "not stored" privacy paragraph is hidden when answers are stored.
  • Test: alembic_single_head_test fails when the migration chain has more than one head.

Stacked on #1158 (order: #1142, #1155, #1159, #1158, this). Needs the migration run and ANSWER_LOG_CHAT=1 set on staging. ask now writes one row per question, so this should be deployed after measurement runs.

Tested: answer_feedback_test, alembic_single_head_test, mcp_ask_test pass; Black clean. Frontend tests run in CI.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@northdpole
northdpole force-pushed the feat/answer-feedback branch 2 times, most recently from b40939d to 957841c Compare October 20, 2026 08:51
@northdpole
northdpole force-pushed the feat/ingest-comprehension branch from c306180 to 6b2c573 Compare October 20, 2026 09:21
@northdpole
northdpole force-pushed the feat/answer-feedback branch 14 times, most recently from 76307f2 to dc9eb78 Compare October 21, 2026 20:05
@northdpole
northdpole force-pushed the feat/ingest-comprehension branch from b6ded96 to 0a34ae0 Compare October 21, 2026 21:09
@northdpole
northdpole force-pushed the feat/answer-feedback branch from dc9eb78 to c672c15 Compare October 21, 2026 21:09
northdpole and others added 9 commits October 21, 2026 22:21
Adds answer_log (every answer + optional rating) with a migration that also merges the
two open alembic heads, and answer_feedback helpers (log, rate, list).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…up/down

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…feedback, GET /admin/feedback

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ER_LOG_CHAT)

The public chat page promises not to store questions, so only MCP answers are logged by default.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…answers are logged

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…stored

Replaces the storage notice added earlier: when thumbs are shown the deployment stores answers.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Fold into the feedback commits during the cleanup pass.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@northdpole
northdpole force-pushed the feat/ingest-comprehension branch from 0a34ae0 to a6573ed Compare October 21, 2026 23:09
@northdpole
northdpole force-pushed the feat/answer-feedback branch from c672c15 to 2556722 Compare October 21, 2026 23:09

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