JobShield
v2
OverviewRecommenderMechanism
GitHub

Product

  • Overview
  • Recommender
  • Mechanism
  • Wage radar

Data

  • Corpus stats
  • Occupations
  • Recommendations
  • Wage radar

Spec

  • Spec v2
  • Q&A prep
  • Plan

Build

  • Pipeline (Py)
  • Tests (145 Py)
  • App (Next.js)
JobShield AI · v2.0.0

Prototype. Skill graph built from hand-authored postings, not real Thai labour-market data. See /mechanism for what this is and isn't.

Mechanism

The math, in six steps.

The spec separates the pipeline into six explicit layers. Every decision is auditable, every formula is testable, and every output carries its provenance back to the source data.

Spec §3.2
01
Skill graph · PPMI

Build a PPMI-weighted co-occurrence graph from job postings. PMI = log P(a,b) / (P(a) · P(b)). Drop edges where PMI ≤ 0. The edge key is the sorted tuple of skill names, so the same pair queried in either order hits the same entry.

ppmi = max(0, log(p_ab / (p_a * p_b)))
Spec §4.2
02
Occupation distance

Distance is 1 minus a clamped similarity. Similarity = direct overlap (sum of min) + indirect PPMI bridge (0.4 hop decay). Output is always in [0, 1]. The top-5 shared skills, ranked by min, come back as the explainable output.

distance = 1 - clamp01(direct + indirect)
Spec §5.3
03
Transition graph

All-pairs skill distance, keep edges where distance ≤ 0.85. Each surviving pair produces two directed edges with mirrored source/target and the same shared_skills list. The graph is unweighted for BFS, weighted for Dijkstra.

edge.skill_distance ∈ [0, 1]
Spec §5.3
04
Layer 1 · Dijkstra

Single-source min-cost path. Edge cost = α · dist_norm + γ · risk_norm. Both factors non-negative, so the standard binary-heap Dijkstra is correct. Alpha = 0.6, gamma = 0.4 by default.

edge_cost = α * dist_norm + γ * risk_norm
Spec §5.3
05
Layer 2 · Rank

Once the path is fixed, score targets by β · wage_norm − path_cost − γ₂ · risk. Wage never appears in the path cost, so it can't telescope. Top N returned, sorted by score descending. Beta = 0.5, gamma2 = 0.3 by default.

score = β * wage_norm − path_cost − γ₂ * risk
Spec §6.2
06
Centrality + Wage radar

Brandes' BFS for betweenness, trivial max-deg-normalized for degree. OLS regression of median wage on degree centrality. Gap = (predicted − actual) / predicted; positive gap flags underpayment. The only red on the page.

gap = (predicted - actual) / predicted