LEARNING
A career-guidance engine for Class 9-10 students
Turns 75 answers into a calibrated career map, and spots careless answering.
Details anonymised
Mine: the assessment and scoring engine (75 questions, 15 traits, calibration and an evaluation pipeline); the career model: a calibrated linear discriminant over 98 career profiles, replacing a random forest too big for a 512 MB host; O*NET aptitude matching, the careless-answering screen and the Gemini roadmaps with a template fallback; Google sign-in, the question bank with a fallback, and the deploys; admin role and row-level security, the first admin dashboard, and the review and rework of the analytics portal (date-range calendar, filter model)
Built with: React 19, TypeScript, Vite, Tailwind v4, Recharts, FastAPI (Granian), scikit-learn, MongoDB Atlas, Supabase (Postgres, Auth, RLS), Gemini via Instructor, Vercel, Render
At a glance
- 75 timed questions, 15 traits, 49 careers
- A 28.6 KB model on a 512 MB free host
- Careless runs blocked before any report
- Career-model file size
- ~60 MB → 28.6 KB
- MEASURED after replacing a random forest that needed about 1.9 GB of RAM on a 512 MB host
- Source: Research reference sections 1 and 4.3, and a trainer re-run, at f40bc90 (private repo), checked 26 Nov 2026
- Scoring API memory, resident
- 1,865 MB → ~124 MB
- MEASURED the random forest against the linear model
- Source: Research reference deployment table at f40bc90 (private repo), checked 26 Nov 2026
- Careers in the catalogue
- 49
- COUNT 98 specialty profiles, 75 questions, 15 traits
- Source: Research reference section 1 and backend notes sections 5-6 at f40bc90 (private repo), checked 26 Nov 2026
The problem
In India, students choose a Class 11 stream (Science, Commerce or Humanities) at the end of Class 10, and that choice decides which degrees they can enter later. It is often made without a structured look at what students enjoy and what they are good at.[4] A test that guides them has to say what it measured and how sure it is. It also has to notice when an answer sheet cannot be trusted. And it had to run on a free 512 MB server, which the first model could not.
What I built
A college team project that I led as lead engineer. A student answers 45 forced-choice scenarios and 30 timed puzzles.[4] Scoring turns the scenarios into 15 behaviour traits, calibrated against a simulated reference population. A linear discriminant over 98 specialty profiles ranks the 49 careers from behaviour alone and keeps a shortlist of 8. O*NET requirements and one aptitude band from the puzzles then order that shortlist, keep 5, and label each career Ready or Stretch. Gemini writes a three-horizon roadmap for those 5 only.
The web app runs on Vercel and the scoring API on Render’s free tier. Supabase holds sign-in and a results ledger under row-level security, and MongoDB Atlas serves the question banks.[4] Every outside service is optional: without MongoDB the bundled banks serve, and without Gemini the labelled template does.[5]
Solid: rules · Dashed fence: model · Diamond: gate · Cyan: data
How it flows
- 45 forced-choice scenarios score 15 behaviour traits, calibrated against a simulated reference population; 30 timed puzzles give one aptitude band.
- A linear discriminant over 98 specialty centroids ranks the 49 careers from behaviour alone and keeps a shortlist of 8.
- O*NET 31.0 requirements and the aptitude band order the shortlist, keep the top 5 and label each one Ready or Stretch.
- Gemini writes a three-horizon roadmap for the 5 chosen careers only. Its output must fit a schema, and a labelled template replaces any roadmap that fails.
Where the model may not decide
Before any of that, a screen looks for careless or mechanical answering. Six signals combine into one score, and a run above 60 is blocked: no report, and the attempt does not count.[3]
Key decisions
Each of these followed a measurement or an incident recorded in the repo’s own notes.[5]
Replace the random forest with a calibrated linear discriminant
- Alternative rejected
- Keep the 150-tree forest on a bigger host, or cut it to 30 trees and lose 3 points of accuracy
- Why
- The forest needed 1,865 MB resident and was killed for memory on the 512 MB host, losing a finished 79-minute sitting. It had also been trained on ideal profiles that the scoring never produces. Fitted to the scoring chain's own output, the linear model is 28.6 KB, and the data fix was worth far more than the model family.
Behaviour picks the careers; aptitude only qualifies them
- Alternative rejected
- Feeding the puzzle scores into the career model, or grading aptitude in five bands
- Why
- In every simulated test, aptitude as a model input lowered accuracy. Thirty puzzles also cannot hold five bands steady across two sittings. So aptitude sets one of three bands, hides only careers two levels above it, and labels the rest Ready or Stretch.
The language model writes roadmaps, never results
- Alternative rejected
- Letting Gemini choose or rank the careers
- Why
- Inference stays deterministic and testable, and a Gemini outage cannot change anyone's result. The schema catches malformed output, not wrong facts, so a failed roadmap falls back to a template that says it is one.
How it was proven
Every accuracy figure here comes from simulated students. The repo’s evaluation script builds students from the career profiles, answers the test the way they would, and grades the career it returns. Re-run at the pinned commit on 26 Nov 2026, it gives the same numbers.[2]
On simulated on-archetype students the top-1 career match is 86.0% (n=300), against a chance level of 2.0% across 49 careers. On simulated students who drift from their profile it is 71.0%, and the simulated top-5 match is 96.3%. Like for like on the old catalogue, the simulated top-1 match climbed from 0.7% to 84.3% (150 careers, chance 0.67%). No real-student validation yet.
The career model itself was rebuilt from the repo on the same day: the trainer wrote a 29,279-byte file, which is 28.6 KB.[1] 40.8 KB at the swap on 13 Sep 2026 (150 careers); 28.6 KB after the catalogue became 49 careers (98 specialty classes) on 17 Oct 2026.
A guard keeps it small: the build aborts above 200,000 bytes. The file also carries a hash of the scoring calibration, but a mismatch only warns, so an edited question bank can leave the model quietly stale until it is retrained.[1]
Solid: rules · Dashed fence: model · Diamond: gate · Cyan: data
How it flows
- The finished sitting is checked for six patterns: trait clustering, a skewed profile, one favourite option slot, long runs of the same slot, scenarios taking far longer than puzzles, and very fast answers.
- Each signal that fires adds evidence through a noisy-OR, so two strong signals compound instead of being averaged away. Three of the six thresholds are percentiles of simulated honest students.
- A score above 60 blocks the run before the career model: no report, and the attempt does not count. At 60 or below, the career model runs as normal.
The screen was tested on simulated responders. It blocked every simulated click-through bot (n=50). 95% of simulated fakers tripped at least one signal, but only 14.5% scored above 60 and would have been blocked (n=200); 22.5% of simulated honest students tripped one too (n=200). At n=2,000, 0.25-0.30% of simulated honest students score above 60 and would be blocked.[3] Three of the six signal thresholds are percentiles of simulated honest students; the other three are set by hand. On a local copy with a made-up demo account, a sitting that always chose option A in about a second was blocked before any career was computed. Its timing signals could not fire for the simulated honest students, whose answers all took 6 seconds or more, so the false-alarm rate for real fast readers is unknown.[3]
Outcomes
The scoring API fits the free 512 MB host again. Its memory fell from 1,865 MB resident with the forest to about 124 MB with the linear model.[1] Since 19 Oct 2026 a blocked run produces no report and does not use up one of the three attempts. The app is live, checked on 25 Nov 2026, but it is not linked here while its live-link gate is open.
A failing roadmap call can no longer cost a finished sitting. Calls retry only on rate limits, timeouts and similar passing errors, at most four times per career and two at a time. When they still fail, that career gets the labelled template.[5] The screenshots on this page come from a local copy run in exactly that state: no database, no model key and a faked sign-in for a made-up student.
Limitations and what I’d change
- The test students are built from the same profiles that define the careers, so the accuracy shows the code matches its design, not that it predicts real careers. I would run a validation study with real students before quoting any accuracy outside this page.
- The 95% signal rate for simulated fakers flatters the screen. When the simulated faker breaks ties at random, only 14.9% trip any signal and none score above 60 (n=1,000); simulated slow random clicking is never blocked either.[3] The browser’s timings are trusted as sent.
- A student near a band edge can get a different list on a retake, because crossing the cut shows or hides all 11 advanced-tier careers at once.[5] I would smooth the band across attempts.
Credits and permissions
Analytics portal (KPIs, filters, per-run drawer, CSV export) built by Akshat Sharma (PR #2)
A college team project; 48 of its 50 commits are mine. The app’s name, the university and the live link are withheld. Every screenshot comes from a local copy run with a made-up demo account and made-up answers, never the live app or its data.
Links and sources
- Model size and memory, research reference and trainer re-run at f40bc90 (private repo), checked 26 Nov 2026
- Simulated evaluation, script re-run and research reference at f40bc90 (private repo), checked 26 Nov 2026
- Careless-answering screen, backend notes section 12 and research reference section 8 at f40bc90 (private repo), checked 26 Nov 2026
- Questions, traits and careers, research reference and backend notes at f40bc90 (private repo), checked 26 Nov 2026
- Design decisions and their limits, research reference and backend notes at f40bc90 (private repo), checked 26 Nov 2026