Urgent.News

What's breaking now, across thousands of outlets.

Tech

How I Built a Referral System That Remembers Past Interactions

Getting a job referral may seem simple, but managing referrals can become difficult when multiple candidates and employees are involved. A candidate usually finds a suitable job, identifies someone working at the company, shares their profile, asks for a referral, and waits for a response. On the employee side, handling multiple referral requests can make it difficult to remember previous…

Job referrals might appear straightforward, but managing them can become challenging as more candidates and employees get involved. A candidate typically finds a suitable job, identifies someone at the company, shares their profile, requests a referral, and waits for a response. From an employee's perspective, handling multiple referral requests can make it hard to remember past conversations, decisions, and interactions with the same candidate.

To address this issue, I developed ReferralHub, an application designed to streamline the referral process in one place. Candidates can explore job opportunities, assess how closely their profile matches a position, and submit referral requests. Employees can review these requests, compare candidate-job matches, and make referral decisions accordingly.

The core innovation of ReferralHub lies in its ability to retain useful information from previous interactions. To achieve this, I added a persistent memory system to the application, allowing it to store and retrieve contextual data from past conversations with candidates. This memory layer is powered by a technology called Hindsight, which I integrated into the ReferralHub backend as a separate memory service.

ReferralHub has two primary user types: candidates and employees. Candidates maintain profiles containing information such as their technical skills, experience, projects, preferred roles, and locations. They can browse available jobs and evaluate the requirements for each position. For instance, a job might require Java, SQL, Spring Boot, and REST APIs.

The system compares these requirements with the candidate's profile and calculates a match percentage, indicating the alignment between the candidate's skills and the job's needs. Candidates can also identify which skills they already possess and which are missing.

Upon finding an appealing job, candidates can submit a referral request through the application. Employees, on the other hand, have a dedicated dashboard to view incoming referral requests, information about candidate-job matching, and the current status of each request. While the basic workflow remains relatively simple, the introduction of the memory layer adds a layer of complexity.

Before implementing the memory layer, MySQL served as the primary database, storing structured application data such as users, candidate profiles, jobs, companies, and referral requests. This worked well for answering questions about the current state, such as a candidate's match percentage or the status of a specific referral. However, some queries required historical context, like whether an employee and candidate had interacted before or what transpired during their previous interaction.

To address this need, I introduced Hindsight as a dedicated memory layer, distinct from the transactional database.

In the ReferralHub architecture, MySQL handles the current and structured application state, while Hindsight manages relevant historical context. To facilitate interaction between the two systems, I created a HindsightService in the backend. This service is responsible for storing and retrieving contextual information based on specific queries.

To further organize the memory, I separated it into different scopes, including candidate, employee, and job context. This organization ensures that memories are stored and retrieved in a relevant and efficient manner.

The impact of the memory layer on the referral workflow is significant. Before implementing memory, the workflow primarily focused on the current state of a referral, such as the match percentage, matched skills, missing skills, and the current status of the referral. However, after adding memory, the application can also retrieve and present valuable historical context from past interactions with the same candidate.

For example, when an employee receives a referral request from a candidate they have previously interacted with, the application can access relevant information from Hindsight. This gives employees a more comprehensive view of the candidate, enabling them to make informed referral decisions based on both current and past interactions.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Week 1: Stabilizing the Handshake — Overcoming E2E Integration Roadblocks

Welcome to the final phase of development for MedReachAI. As we transition into the Software Integration phase, my partner, Collin, and I are shifting our focus from building core features to…

  • Solved memory crashes by implementing Direct-to-Bucket architecture for data ingestion.
  • Sprint 7 resolved integration bugs, including Auth & Header Parity and Endpoint Alignment.

When to Park an Over-Engineered Feature Branch

Engineering maturity involves knowing when not to ship. Many development teams face a moment where technical ambition outpaces practical utility.

  • Engineering teams struggle to determine when to stop developing over-engineered features.
  • Team decided to park experimental branch to preserve technical research and prevent technical debt.

More from Tuesday 29 September →