feat: answer what is like this section or instructor - #641
Draft
jaspermayone wants to merge 1 commit into
Draft
jaspermayone wants to merge 1 commit into
jaspermayone wants to merge 1 commit into
Conversation
Adds /api/v1/catalog/sections/:crn/similar and /api/v1/catalog/instructors/:pub_id/similar, plus a similar field on both GraphQL types. Similar sections stay in the same term and leave out the other sections of the same course, which would otherwise fill the list with what the student is already reading.
jaspermayone
added this pull request to stack #643
September 19, 2026 22:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #453. Stacked on #640.
Two endpoints that answer "what is like this one?":
and the same on GraphQL:
{ section(crn: 17294) { similar(limit: 5) { crn title } } }Two choices worth reviewing:
what is offered now, and the same course in another term carries identical
text, so it would always win.
nearest thing to COMP 1050-01 and the least useful answer to the question.
limitis 10 by default and 50 at most, in both surfaces. The GraphQL fieldscarry
complexity: 10and a@listSizedirective, because each one runs itsown vector query; the published cost stays honest.
The list is empty until the record has a vector, which the nightly backfill
writes.
Tests
bundle exec rspecis green locally (1552 examples), including the emptycases, the limits, and the 404s.
Stack created with GitHub Stacks CLI • Give Feedback 💬