Skip to content

ANG-008:Similarity computation, edge creation & SQLite cache#12

Merged
yugalkaushik merged 3 commits into
devfrom
ANG-008
Jul 21, 2026
Merged

ANG-008:Similarity computation, edge creation & SQLite cache#12
yugalkaushik merged 3 commits into
devfrom
ANG-008

Conversation

@yugalkaushik

Copy link
Copy Markdown
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 comment was marked as resolved.

@yugalkaushik
yugalkaushik merged commit 2438ddd into dev Jul 21, 2026
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.

2 participants