feat: add recommendation feedback loop support#1678
Conversation
🎉 Welcome to Hybrid Recommender, @Avnithakur731-a!Thank you for your first pull request! Here's what happens next:
⏱️ Please respond to any review comments within 48 hours. 📖 Resources: Happy contributing! 🚀 |
|
🎉 Welcome to Hybrid Recommender, @Avnithakur731-a! This is your first contribution here! Labels added: PR Description Checklist: What happens next:
⏱️ Please respond to review comments within 48 hours. |
|
Hi @leonagoel, I have completed the implementation for this issue and submitted PR #1678. The PR includes the feedback APIs, feedback statistics endpoint, router integration, and frontend feedback controls for Like, Dislike, Save, and Skip actions. Could you please review the PR when you have time? I would appreciate your feedback and any suggestions for improvement. Thank you! |
Related Issue
Closes #1563
Why
This feature introduces a recommendation feedback loop so users can provide explicit feedback on recommended items. The collected feedback can be used for future personalization and recommendation improvements.
What Changed
Backend
Added
backend/routers/feedback.pyAdded
POST /api/feedbackAdded
GET /api/feedback/user/{user_id}Added
GET /api/feedback/statsAdded feedback storage structure containing:
Registered feedback router in
backend/main.pyFrontend
Added feedback buttons on recommendation cards:
Added event handling for feedback actions
Connected feedback actions with backend APIs
Added feedback interaction support in recommendation UI
How to Test
Start the backend server.
Open the recommendation interface.
Generate recommendations.
Click any feedback button (Like, Dislike, Save, Skip).
Verify feedback is submitted successfully.
Verify feedback can be retrieved using:
GET /api/feedback/user/{user_id}Verify statistics endpoint:
GET /api/feedback/statsNotes
This PR implements feedback collection and retrieval functionality. The collected feedback serves as a foundation for future recommendation score optimization and personalization enhancements.