Skip to content

feat: similar posts via embeddings#19

Merged
benthecoder merged 1 commit into
mainfrom
related-posts
Jul 12, 2026
Merged

feat: similar posts via embeddings#19
benthecoder merged 1 commit into
mainfrom
related-posts

Conversation

@benthecoder

Copy link
Copy Markdown
Owner

each post now lists its 4 most similar posts, computed from the knowledge map's cosine-similarity edges that the build already generates — zero runtime db queries, the index is built once from the json and cached in module scope.

til: module-level variables in next.js server code survive across requests within the same server process, so a lazily-built index like this is effectively a free memo — but it also means you should never put per-request state there.

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Jul 12, 2026 6:08am

@benthecoder
benthecoder merged commit 99ca712 into main Jul 12, 2026
2 of 3 checks passed
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.

1 participant