Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rec] Implement recommendation algorithm #88

Merged
merged 7 commits into from
Apr 21, 2024

Conversation

kylezryr
Copy link
Contributor

What's new in this PR

  • Implemented a recommendation algorithm that displays the user's recommended stories on the home page
  • Recommended stories are based on the user's recently viewed stories, finding the 5 most similar stories to the recently viewed stories based on the story's content
  • Recommendations only refresh once the home page is refreshed
  • Added functionality to add stories on the home page to the recently viewed when clicking on them to keep the recommendation algorithm updated

Relevant Links

Notion Sprint Task

https://www.notion.so/calblueprint/rec-Implement-recommendation-algorithm-973d28ff52ad4357aa94e851032bebf8

Online sources

Supabase OpenAI Vector extension documentation:

Tutorial the algorithm is mostly based on: https://www.notjust.dev/blog/ai-movies-supabase-vector

Related PRs

How to review

  • Open the home page and check if there are recommended stories, if not, open some random stories and refresh the app to see if recommended stories are displayed
  • Add more stories to your recently viewed by searching for them and clicking on stories on the home page
  • Refresh again and check that different stories are recommended
  • Check the recommended stories to see if they are actually (somewhat) similar to your recently viewed stories

Next steps

  • Added functions to the Node which still needs to be pushed

Tests Performed, Edge Cases

  • Checked that stories are recommended if there are stories in the recently viewed
  • Checked that no stories are recommended if there are no recently viewed stories
  • Checked that the recently viewed stories in the search screen still works with these new changes

Screenshots

RPReplay_Final1713646802.MP4

CC: @adityapawar1

Copy link
Collaborator

@adityapawar1 adityapawar1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

holy fuck massive pr GREAT JOB

@adityapawar1 adityapawar1 merged commit b88af9e into main Apr 21, 2024
1 check passed
@adityapawar1 adityapawar1 deleted the kyle/recommendationAlgorithm branch April 21, 2024 22:00
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.

3 participants