feature implemented - #86
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Make Fit Scoring Stricter (But Reasonable)The goal of this change is to prevent candidates with 0 years of experience from scoring "High Yellow" (68% - 75%) on roles that strictly require Senior-level experience (4+ years), while still rewarding them reasonably if they possess a perfect tech-stack match. Open QuestionsBefore we proceed, please review the proposed logic below and confirm if you agree with the penalties. Important Does the "Hard Cap" rule for the Deterministic algorithm (Max 65% if you lack the minimum experience) sound fair to you? Or would you prefer it just scales down mathematically without a hard ceiling? Proposed ChangesBackend (Node.js) - Deterministic MathWe will update the [MODIFY]
|
Role Fit Analysis Implementation Plan
This plan outlines the architecture and steps to implement the deterministic and AI-powered role fit analysis, integrated across applications, details, and analytics.
User Review Required
Important
Please review the updated deterministic logic, which now relies on smart keyword inference (Seniority Mapping) to handle edge cases like missing explicit experience requirements. I have also added the necessary migration, backfill scripts, and the detailed unit test plan based on your provided Job Descriptions.
Proposed Changes
1. Database Schema Updates & Migrations
applicationstable updates:fit_score_deterministic(Integer, 0-100). (Note: Color rendering is handled dynamically by the frontend based on this score).fit_analysis_ai(JSONB) to store the optional AI report results (score, percentages, short explanation).Supabase Migration Script (
backend/migrations/003_add_fit_analysis.sql):2. Backend Service (Node.js): Advanced Deterministic Calculation
Goal: A fast, clever, precise, and highly maintainable reproducible function to calculate a 0-100 fit score without AI.
backend/services/fitAnalysis.service.jscontainingcalculateDeterministicFit(candidate, jdText).backend/config/fitRules.json(or constant map) to store seniority mappings and synonyms.2-5 years,2+ years).skillstable,profiletext, andprojectstech stack.infotext using a synonym dictionary.3. Backend Service (Python/FastAPI): AI-Powered Analysis
Goal: Deep analysis using Groq/LLM as an optional enhancement.
POST /analyze-fit).4. Triggering Analysis on Application Creation
backend/controllers/applications.controller.js(createApplicationmethod).fit_score_deterministicto the database.app_settingstable) to see if AI fit analysis is enabled and which model to use.fit_analysis_aionce completed.5. Frontend UI: Settings, Applications Table & Detail Page
SettingsPage.jsx:ApplicationsPage.jsx(Table View):fit_score_deterministicinteger from the DB.ApplicationDetailPage.jsx:RoleFitAnalysiscomponent.fit_analysis_aiexists, render the concise AI report.6. Analytics Integration
AnalyticsPage.jsx:fit_score_deterministicandfit_analysis_aidata in the analytics queries.7. Production Backfill Script
We will create a Node.js script
backend/scripts/backfillFitScores.jsto retroactively calculate and save the deterministic fit score for all existing applications on the production server.Verification Plan & Unit Tests
Backend Unit Tests (Jest)
We will create
backend/tests/fitAnalysis.test.jsto thoroughly test the deterministic engine using real-world Job Descriptions.Test Cases to Implement:
[2, 5]years. Candidate with 3 years gets max experience points. Candidate with 0 years gets heavily penalized.0-2years. A candidate with 6 years gets penalized as overqualified; a candidate with 1 year fits perfectly.2years (e.g.,[2, 99]). Candidate with 1 year is borderline, candidate with 3 years fits perfectly.How to Run Tests Locally
Before pushing to staging, run the following commands in your terminal to execute the unit tests and ensure the deterministic parsing works perfectly on the provided sample JDs:
(Ensure all assertions pass and the Regex handles variations like
2–5vs2-5vs2+)Manual Verification
backfillFitScores.json staging and verify applications get scores.Job Fit Analysis Feature Walkthrough
The Job Fit Analysis feature has been fully implemented, providing both a deterministic baseline score based on keyword matching and an optional AI-powered analysis to give deep insights into how well your profile matches a job description.
1. AI Feature Routing Configuration
You can now toggle and configure the AI provider for Job Fit Analysis in the Settings page under the "AI Integration" tab.
groqif enabled and no provider is specified.2. Deterministic & AI Scoring
When a new application is added with a job description:
3. Applications Table Integration
The Applications Table now includes a "Fit" column:
4. Application Details Page
When viewing a specific application, a new Role Fit Analysis card has been added.
5. Analytics Integration
The Analytics page now includes a Job Fit Insights section:
6. Backfill Script
A script
backend/scripts/backfillFitScores.jshas been created. Running this script via Node on your production server will calculate the deterministic score for all existing applications that have a job description but no score yet.cd backend node scripts/backfillFitScores.js