PROJECT

Pairwise

A professional, human-in-the-loop matchmaking dashboard featuring a deterministic 100-point compatibility engine and AI-generated rationales.

What this is

Pairwise is an internal dashboard designed for high-touch, professional matchmakers. Consumer dating apps rely on endless swiping and black-box algorithms; professional matchmaking requires the exact opposite. A matchmaker needs to know exactly why two people are a good fit and they need to maintain complete control over the introduction process.

I built Pairwise to solve that specific problem. Instead of letting an LLM arbitrarily pick matches (which risks hallucinations and ignoring hard boundaries), the platform uses a deterministic math engine to score compatibility. AI is used only as an explainer—taking the top mathematical matches and generating warm, personalized rationales that the matchmaker can review, edit and send to the client.

What’s inside

  • Deterministic Matching Engine: A pure TypeScript 100-point scoring matrix. It uses strict hard filters (age, gender, marital status) and gender-tailored weights (prioritizing socioeconomic alignment for men and educational parity for women).
  • AI-Assisted Rationales: Integrated Google Gemini to generate 2-sentence analytical rationales and 3-sentence personalized intros for the top candidates.
  • Match Lifecycle Management: Matchmakers can send a match (which auto-updates the client’s journey status from “Active Search” to “Matching”), edit the AI-generated intro before dispatch and revoke matches with a full audit trail.
  • Journey & Notes Tracking: A comprehensive client profile view with 25+ biodata points, a timestamped private notes widget and a global match history log with search and PDF export.
  • Candidate Pool Explorer: A dedicated interface to browse the database of available, unassigned profiles.

How it’s built

The frontend uses React and Vite, styled with Tailwind and leverages TanStack Query to handle server state (caching and auto-invalidating the UI when a match is sent). The backend is a TypeScript/Express API deployed to Vercel as serverless functions.

Because serverless functions spin up and down constantly, I had to implement a global Mongoose connection cache to prevent exhausting the MongoDB Atlas connection pool. I also wrapped the Gemini API calls in a strict Promise.race timeout—if the AI takes too long to respond, the system seamlessly falls back to a deterministic string template built from the top-scoring categories, ensuring the user flow is never blocked.

What I took from it

Building this under a tight deadline taught me a lot about serverless architecture and the realities of combining LLMs with strict logic. I spent hours debugging a MongoDB SRV DNS resolution failure on Windows and learned that the biggest challenge with AI isn’t getting it to generate text—it’s engineering the fallback systems so the app doesn’t break when the AI inevitably times out. I also learned that constraints breed creativity; decoupling the pure math engine from the API controllers made it incredibly easy to test and iterate on the algorithm.