Inspiration

Exam season, three deadlines in one week, four hours of sleep, a parent asking about grades, and for many of us, a family in a different time zone. Students rarely lack places to vent. What we lack is a quick way to see what is actually weighing on us, and a next step small enough to do tonight. Mood-tracking apps either give you a blank diary or upload your most private sentences to a server. We wanted to see whether a small AI model could do something useful with those sentences without them ever leaving the laptop.

What it does

You write a few sentences, the way you would text a friend. In about 50 ms Unload:

  1. Names your stressors across 9 student-specific categories: exams, deadlines/workload, sleep, money, loneliness, family expectations, homesickness/culture, future/career, body/health.
  2. Shows its reasoning. Every label points to the exact sentence that triggered it, with a similarity score. Sentences it is unsure about are marked 🤷 instead of being guessed.
  3. Suggests three small actions (e.g. "One 25-minute sprint", "Park your worries on paper", "Share effort, not just results"). They are retrieved by meaning from 26 hand-written, sourced coping cards, one per stressor.
  4. Switches to support when it detects crisis language. Tips are replaced by help lines (China 12356, US 988, findahelpline.com), and it shows which phrase triggered the check.
  5. Finds patterns over 14 days, all in localStorage: your top stressor, stressors that travel together ("Deadlines showed up in 5 of the 5 check-ins that mentioned sleep"), and whether your load is rising.
  6. Proves it's private. The status bar counts network requests made after the model loads. It stays at 0, and the app works offline.

Representative inputs and outputs (real app output):

Check-in Unload's output
"I have two essays due Friday and I only slept 4 hours. My mom keeps asking about my grades and I'm scared of the organic chem midterm." Heavy day, load 82. ⏰ Deadlines (0.70), 😴 Sleep (0.78), 🏠 Family (0.73), 📝 Exams (0.78). Tips: exam plan, park your worries, share effort with family
"Pretty good day honestly. Finished my problem set early, went for a run, and had dinner with friends." Light day. No stressors, every sentence marked 🌿 calm
"This exam is killing me lol. If I have to write one more lab report I'm going to die." 📝 Exams. No crisis alarm (hyperbole handled)
"I don't want to be alive anymore." Safety card with help lines, triggered by both the phrase pattern and semantic similarity (0.97)

How we built it

  • Model: BAAI bge-small-en-v1.5 sentence embeddings (int8 ONNX, 34 MB), run in the browser with Transformers.js and ONNX Runtime Web (WebAssembly). The model files are served with the site. Remote model loading is disabled, so there are no API keys and no cost.
  • Classifier: a few-shot nearest-prototype classifier. We hand-wrote 98 short stressor sentences across 9 categories plus 16 "calm" sentences. Each sentence of a check-in gets the mean of its top-3 cosine similarities per class. A label needs ≥ 0.60 and must beat "calm"; a second label is kept if it is within 0.01 of the first.
  • Safety layer: two independent detectors, 10 regex patterns (English and Chinese) and semantic similarity to 15 crisis phrases (≥ 0.72). Either one fires the support card. Tuned for recall.
  • Load score: similarity to negative versus positive affect anchors, blended with the number of distinct stressors.
  • Retrieval: coping cards are embedded once. For each detected stressor we pick the card closest in meaning to your sentences that carried that stressor.
  • App: plain HTML/CSS/JS ES modules, no framework and no build step. SVG chart. localStorage history with export and delete. Deployable as a static site on GitHub Pages.
  • Evaluation tooling: Node runs the same model files to score a dev set and a held-out set against a keyword baseline. There are unit tests (node:test) and a headless-Chrome end-to-end test that also asserts zero external requests.

AI components and disclosure

  • AI in the product: bge-small-en-v1.5 (pre-existing, MIT, ONNX export by Xenova) produces sentence embeddings. Our code does the classification, safety checks, retrieval and pattern analysis on top of them. The model never generates text shown to the user. All tips and support wording are hand-written, a deliberate safety choice.
  • Pre-existing components: the embedding model, Transformers.js, ONNX Runtime Web.
  • Built during the event: all application code, the 114 example sentences, 15 crisis phrases, 26 coping cards, both test sets, the evaluation harness, the tests and the demo-video tooling.
  • AI assistance in building: most code and text were drafted with an AI coding assistant (Grok Bot), directed, reviewed and tested by Yinqi Chen. The demo narration is a synthetic voice (Edge TTS, "Aria").

How we tested it

  • Dev set (74 check-ins, used while building): stressor micro F1 78% versus 66% for a keyword baseline. Crisis entries caught: 8/8 (regex alone 5/8), with 3/66 false alarms.
  • Held-out set (36 check-ins, written after freezing the model, examples and thresholds): micro F1 80% versus 55% keyword. Recall is 84% versus 45%. Crisis entries caught: 2/3 (regex alone 1/3), with 0/33 false alarms.
  • We compared two embedding models on the dev set. all-MiniLM-L6-v2 scored about 61% F1 and bge-small-en-v1.5 about 76%, so we switched.
  • 6 unit tests, plus a headless-Chrome end-to-end test covering multi-stressor, calm, crisis and Chinese input, zero external network requests, and zero console errors.
  • All test sets and per-example results are public in the repo (eval/results.md). The same person wrote the examples and the test sets, so treat this as a careful smoke test, not a clinical benchmark.

Failure cases and limitations

  • Missed crisis signal: "I feel like a burden to everyone around me." is labelled loneliness, with crisis similarity 0.715 against a 0.72 threshold. Lowering the threshold would add false alarms. Indirect ideation is the hardest case and the main reason Unload always points to human help.
  • False alarm: "Honestly I want to die, this group project is a nightmare." shows the support card. Regex can't tell hyperbole from intent, so we chose to over-react and say so in the card.
  • Sarcasm: "Oh great, another 8am exam, just what I needed" yields no stressor.
  • Language: English only. Chinese input gets no stressors; the UI shows a notice, and a few Chinese crisis phrases are still caught by regex.
  • Topic over sentiment: "Midterm grades are out and I did better than expected" is still tagged Exams.
  • First load downloads about 62 MB (model plus WASM runtime) once, then it is cached.
  • Unload is not a diagnostic or medical tool.

Challenges we ran into

  • Keywords versus meaning: our first model (MiniLM) barely beat a keyword list. Building an eval harness first let us measure and justify switching to bge-small.
  • A non-determinism bug: identical eval runs gave different scores. The int8 model quantises activations per batch, so a sentence's embedding depended on what else was in the batch. We now embed one sentence at a time, in both the app and the eval.
  • Safety trade-offs: "this exam is killing me" must not trigger a crisis card, but "I don't want to wake up" must. We removed "killing me" from the patterns, kept recall-first thresholds, and documented the remaining errors instead of hiding them.
  • Serving a model from a static site: Transformers.js tokenizer discovery broke with an absolute model URL. A relative models/ path fixed it, and we vendored the exact WASM runtime so nothing is fetched from a CDN.

Accomplishments that we're proud of

  • Real AI, with no server, no API key and no cost: any student can use it, and judges can try it instantly.
  • Explanations a student can understand: "this sentence → this stressor, 0.78".
  • An honest evaluation, with a held-out set, a baseline, and failure cases shipped in the README and the video.

What we learned

  • Few-shot embedding classifiers are strong enough for focused, everyday text, and their quality depends on the example sentences as much as on the model.
  • Measuring early (a baseline plus a held-out set) changes design decisions.
  • For wellbeing tools, retrieval over hand-written content is safer than free-form generation.

What's next

  • A multilingual model (e.g. multilingual-e5-small) with a Chinese eval set.
  • Counsellor review of cards and crisis wording; consented testing with real students.
  • A small fine-tuned classifier for indirect ideation.
  • An optional, student-controlled weekly summary to share with a counsellor.

Built With

Share this project:

Updates

Submission history