ANG-008:Similarity computation, edge creation & SQLite cache#12
Merged
Conversation
yugalkaushik
commented
Jul 18, 2026
Collaborator
- Compares every note's vector with every other note's vector, using cosine similarity (dot product on normalized vectors).
- For large note collections, uses Joplin's own search instead of comparing every pair one by one, so it stays fast.
- Turns raw similarity scores into a 0 to 1 scale, and keeps only each note's top 5 matches.
- Gives a small score boost when two notes share a tag.
- Gives a small score boost when two notes are already linked to each other.
- Gives a small score boost when two notes were created close together in time.
- Has a safety floor so tags alone can never create a fake connection only real similarity or a real link can.
- Turns the similarity scores into graph edges, on top of the existing link and tag edges.
- Saves each note's vector in a local SQLite database so notes that haven't changed don't need to be re-fetched next time.
- Cleaned up the code so each function does one clear job as suggested
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.