Skip to content

HimanshTheCoder/NeuralPath

Repository files navigation

NeuralPath — AI-Adaptive Onboarding Engine

An intelligent onboarding system that parses a new hire's resume and a target Job Description, identifies skill gaps, and dynamically generates a personalized learning pathway using a graph-based adaptive algorithm.


Table of Contents


Overview

NeuralPath solves the "one-size-fits-all" onboarding problem. Instead of a static training curriculum:

  1. Upload a resume (PDF/TXT) and a Job Description
  2. Groq/LLaMA parses both documents and extracts raw skill names and proficiency levels
  3. Our graph-based engine (pathwayEngine.js) computes skill gaps, scores, and a topologically-sorted learning pathway
  4. The adaptive loop re-orders the pathway in real time as the learner completes modules and scores quizzes

Architecture

┌─────────────────────────────────────────────────────────────┐
│                        NeuralPath                           │
│                                                             │
│  ┌──────────────┐    ┌──────────────────────────────────┐  │
│  │  React + Vite │    │       pathwayEngine.js           │  │
│  │  (Frontend)   │    │  ┌──────────────────────────┐   │  │
│  └──────┬────────┘    │  │  1. SKILL_GRAPH (DAG)     │   │  │
│         │             │  │  2. computeGapAnalysis()  │   │  │
│         ▼             │  │  3. topoSort() — Kahn's   │   │  │
│  ┌──────────────┐     │  │  4. buildPathway()        │   │  │
│  │   groq.js    │     │  │  5. adaptPath()           │   │  │
│  │  (NLP Only)  │     │  └──────────────────────────┘   │  │
│  │              │     └──────────────────────────────────┘  │
│  │ extractSkills│                                           │
│  │ Only()       │     ┌──────────────────────────────────┐  │
│  └──────┬───────┘     │  Firebase                        │  │
│         │             │  - Auth (login/signup)           │  │
│         │             │  - Firestore (progress sync)     │  │
│  LLaMA 3.3 70B        └──────────────────────────────────┘  │
│  via Groq API                                               │
└─────────────────────────────────────────────────────────────┘

Key design principle: Groq/LLaMA is used only as an NLP text parser to extract skill names. All analytical logic — gap scoring, priority calculation, pathway ordering, and adaptive re-routing — is implemented in pathwayEngine.js as original code.


Adaptive Pathing Algorithm

Located in src/lib/pathwayEngine.js. Four stages:

Stage 1 — Skill Dependency Graph (SKILL_GRAPH)

A hand-crafted Directed Acyclic Graph (DAG) of ~35 skills with prerequisite edges:

Python → Machine Learning → Deep Learning → NLP
Docker → Kubernetes
Linux/Bash → Docker → CI/CD

This ensures a learner is never assigned an advanced module before its prerequisites.

Stage 2 — Gap Scorer (computeGapAnalysis)

For each required skill, we calculate:

candidateScore  = LEVEL_SCORE[candidateLevel]   // none=0, beginner=20 … expert=100
requiredScore   = importanceToRequired[importance]  // critical=90, high=75, medium=60
gapMagnitude    = max(0, requiredScore - candidateScore)
urgencyBoost    = count(skills that depend on this skill) × 15
priorityScore   = gapMagnitude + urgencyBoost

priorityScore ≥ 70high, ≥ 35medium, else low.

Overall readiness:

overallReadiness = mean(candidateScore / requiredScore) across all required skills × 100

Time estimate:

estimatedHours = totalGapPoints × 0.12
estimatedWeeks = max(2, round(estimatedHours / 8))

Stage 3 — Topological Sort (topoSort)

Uses Kahn's Algorithm on the gap skill set to produce a valid learning order:

  1. Build in-degree map scoped only to the candidate's gap skills
  2. Enqueue all skills with in-degree 0 (no unlearned prerequisites)
  3. Process queue: output skill, decrement dependents' in-degrees, enqueue newly freed skills
  4. Tie-break within same depth level by priorityScore descending

This guarantees: if skill B requires skill A, A always appears before B in the pathway.

Stage 4 — Adaptive Re-ordering (adaptPath)

Called after each module completion with the learner's quiz score:

Score Action
< 60 (weak) Insert a remedial "review" lab module immediately after the completed module
60–84 (normal) No change — pathway continues as planned
≥ 85 (strong) Unlock the next locked module early (move from lockedupcoming)

Tech Stack

Layer Technology
Frontend framework React 18 + Vite 5
Styling Tailwind CSS 3
Routing React Router v6
Charts Recharts
NLP / AI extraction Groq API — LLaMA 3.3 70B
Auth & Database Firebase (Auth + Firestore)
File parsing PDF.js (client-side PDF text extraction)
Gap analysis Original algorithm — pathwayEngine.js

Dependencies

"dependencies": {
  "firebase": "^10.11.0",
  "lucide-react": "^0.344.0",
  "react": "^18.2.0",
  "react-dom": "^18.2.0",
  "react-dropzone": "^14.2.3",
  "react-router-dom": "^6.22.0",
  "recharts": "^2.12.1"
},
"devDependencies": {
  "@vitejs/plugin-react": "^4.2.1",
  "autoprefixer": "^10.4.17",
  "postcss": "^8.4.35",
  "tailwindcss": "^3.4.1",
  "vite": "^5.1.3"
}

External (loaded via CDN at runtime):

  • pdf.js 3.11.174 — client-side PDF text extraction

Setup & Installation

Prerequisites

  • Node.js 18+
  • A Firebase project with Auth + Firestore enabled
  • A Groq API key (free tier is sufficient)

Steps

# 1. Clone the repository
git clone https://github.com/your-username/NeuralPath.git
cd NeuralPath

# 2. Install dependencies
npm install

# 3. Set up environment variables
cp .env.example .env
# Edit .env and fill in your Firebase and Groq credentials

# 4. Start the development server
npm run dev

Open http://localhost:5173 in your browser.

Build for production

npm run build
npm run preview

Running with Docker

# Build the image
docker build -t neuralpath .

# Run (pass your env vars at runtime)
docker run -p 8080:80 \
  -e VITE_FIREBASE_API_KEY=your_key \
  -e VITE_GROQ_API_KEY=your_key \
  neuralpath

Then open http://localhost:8080.

Note: Because this is a Vite app, environment variables are embedded at build time. For Docker, rebuild the image after updating your .env file, or use a runtime config injection approach.


Environment Variables

Copy .env.example to .env and fill in:

Variable Where to get it
VITE_FIREBASE_API_KEY Firebase Console → Project Settings → Your Apps
VITE_FIREBASE_AUTH_DOMAIN Same as above
VITE_FIREBASE_PROJECT_ID Same as above
VITE_FIREBASE_STORAGE_BUCKET Same as above
VITE_FIREBASE_MESSAGING_SENDER_ID Same as above
VITE_FIREBASE_APP_ID Same as above
VITE_GROQ_API_KEY console.groq.com → API Keys

Never commit your .env file. It is listed in .gitignore.


Project Structure

src/
├── lib/
│   ├── groq.js              # Groq/LLaMA NLP layer — skill extraction only
│   └── pathwayEngine.js     # ← Our original adaptive algorithm
│       ├── SKILL_GRAPH      #   Dependency DAG
│       ├── computeGapAnalysis()  # Gap scoring + readiness calculation
│       ├── topoSort()       #   Kahn's topological sort
│       ├── buildPathway()   #   Phase + module builder
│       └── adaptPath()      #   Knowledge-tracing feedback loop
├── pages/
│   ├── UploadPage.jsx       # Resume + JD upload → triggers pipeline
│   ├── AnalysisPage.jsx     # Displays gap analysis results
│   ├── PathwayPage.jsx      # Interactive learning roadmap
│   └── DashboardPage.jsx    # Progress tracking + stats
├── context/
│   └── AppContext.jsx       # Global state + Firebase sync
└── components/
    ├── layout/              # Navbar, Footer
    ├── ui/                  # Reusable UI primitives
    └── auth/                # ProtectedRoute

Team

Built for the ARTPARK CodeForge Hackathon.

About

AI-Driven Onboarding That Adapts to You

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages