Understanding pgvector cosine similarity and how issues are ranked.
5 min readAt its core, OSBridge compares two vectors: your skill profile embedding and each issue's embedding. The closer these vectors are in 768-dimensional space, the better the match.
Cosine similarity measures the angle between two vectors. A value of 1 means they point in exactly the same direction (perfect match), 0 means they're perpendicular (no relation), and -1 means they're opposite.
-- pgvector cosine distance query
SELECT
id,
title,
1 - (issue_embedding <=> skill_embedding) AS match_score
FROM issues
WHERE
is_open = true
AND has_linked_pr = false
AND comment_count < 10
ORDER BY issue_embedding <=> skill_embedding
LIMIT 20;Not every issue makes it through. We apply strict freshness filters to ensure you only see actionable issues:
After filtering, the top 20 issues are ranked by match score. The top 5 receive a custom AI-generated "Why You" explanation, making it clear why your specific skills qualify you for the issue.
Warning
On this page