A deep dive into how OSBridge's AI matching engine works under the hood.
5 min readOSBridge is built on a modern full-stack architecture designed for semantic matching at scale. The system connects three data pipelines: user skill profiling, issue indexing, and AI-powered matching.
LeetCode tags → Normalized concepts → Gemini embedding → skill_profiles table
GitHub API → Issue title + body → Gemini embedding → issues table
pgvector cosine similarity → Top-20 matches → Gemini explanations → matches table
| 1 | // Simplified matching pipeline |
| 2 | async function matchUserToIssues(userId: string) { |
| 3 | // 1. Fetch user's skill embedding |
| 4 | const profile = await getSkillProfile(userId); |
| 5 | |
| 6 | // 2. Run cosine similarity search via pgvector |
| 7 | const matches = await db.select() |
| 8 | .from(issues) |
| 9 | .orderBy(sql`skill_embedding <=> ${profile.embedding}::vector`) |
| 10 | .limit(20); |
| 11 | |
| 12 | // 3. Generate personalized explanations for top 5 |
| 13 | const explained = await generateExplanations(matches.slice(0, 5), profile); |
| 14 | |
| 15 | return explained; |
| 16 | } |
Cosine Similarity
On this page