Inspiration
Everyone is talking about AI and jobs:
- Dario Amodei, CEO of Anthropic, warned that AI could eliminate half of entry-level white-collar jobs and push unemployment to 10–20% within one to five years (Axios, May 28, 2025).
- Kristalina Georgieva, Managing Director of the IMF, said AI will affect almost 40% of jobs worldwide, and 60% in advanced economies (Bloomberg, January 14, 2024, and the IMF blog).
- The International Labour Organization found that one in four workers is in an occupation with some exposure to generative AI, and that most jobs will be transformed, not eliminated (ILO Working Paper 140, 2025, and «Generative AI and jobs: A 2025 update»).
Yet almost nobody can check what this means for their own job. The official data exists: the ILO scores about 30,000 tasks for their exposure to generative AI. But it lives in spreadsheets and classification codes. And few people want to paste their CV and their worries about the future into a chatbot in the cloud.
What it does
A person tells Workray what they do, in their own words, in English, Spanish or Catalan. Workray gives them a report built from official data:
- Your story. You describe your day-to-day work. A nurse might write: "I work nights as a nurse on a hospital ward. I give patients their medication, check their vital signs, write up their charts and talk to families when something changes." Workray AI reads it on the device and shows what it understood: the occupation, the workplace and the tasks. You can also show Workray AI a photo of your CV or of a job offer; the image is read only on the device and never leaves it.
- Your official occupation. Three engines and their calibrated fusion, all running in the browser, match your words to the official classification (ESCO and ISCO-08). When they are unsure, the engine picks the most useful question and Workray AI asks it in plain words. You answer in your own words. You can always search the official classification by hand.
- Your tasks. The official ILO tasks for your occupation. The ones you mentioned are already suggested; you keep the ones that are yours.
- Your report. Each task with its exposure to generative AI on the ILO index, the job market for your occupation in Spain and Catalonia from official statistics, and official training and accreditations. Workray AI explains the report in plain language and answers your questions about it. The full briefing, a long document, is written in the cloud with your permission and a connection; without them, Gemini Nano writes it on the device, one section at a time. You can ask Workray AI what you would like to learn; it suggests courses from the catalog only and says why each one fits.
The report measures exposure; it does not predict. Every answer from Workray AI says where it was made: "On this device" or "Gemini in the cloud". There is no account, and nothing you write is sent to a Workray server. Without Workray AI, every step still works by hand. Once installed, Workray works offline from a verified copy of its data.
Four AIs, working together in your browser
What makes Workray different: it does not hand your story to one big model. Four AIs work together on your device.
- Semantic vectors (our engine). We distilled Google's EmbeddingGemma into a tiny model (256 dimensions, int8) and tuned it on official ESCO and ILO texts. It understands your words by meaning.
- A phrase classifier (our engine). It reads how people really talk about their work and votes for an occupation group.
- A Bayesian engine (our engine). It picks the single question with the highest expected information gain.
- Workray AI (Gemini Nano on the device, Gemini in the cloud through Firebase AI Logic). It reads your story, asks the engine's question in plain words and explains your report.
The three engines are our own: built from scratch, trained on Kaggle, and small enough to run in the browser with no server. A calibrated fusion joins their results into one official occupation in seconds, even offline.
Value proposition
- For people worried about AI and their job: an answer about their tasks, from official data, in their language, without handing their story to a cloud service.
- For public employment services and career counselors: a guidance tool where the answers that run on the device cost nothing per query, with no accounts to manage. It starts in Barcelona and Catalonia with official data. The ILO index is worldwide, so Workray can be brought to other countries.
How we use Firebase AI Logic
Workray's generative AI layer, Workray AI, uses the Firebase AI Logic hybrid inference SDK for the web (Firebase JS SDK 13.3.0) with the Gemini Developer API backend (GoogleAIBackend). The integration lives in web/scripts/keeper/. firebase.js is the only file that imports the SDK, and it loads each module on first use.
One routing rule decides where each task runs. decideRoute() in routing.js is a pure function, tested row by row. It turns what a task needs and what the browser can do into an InferenceMode:
| Task | Where it runs | InferenceMode |
Why |
|---|---|---|---|
| Reading the person's story, suggesting tasks, explaining the report, answering questions | On the device | ONLY_ON_DEVICE without permission; PREFER_ON_DEVICE with it |
This is the personal part. With permission, the cloud is only a safety net if the local model fails |
| Reading a photo of a CV or a job offer | Always on the device | ONLY_ON_DEVICE |
Personal details cannot be removed from an image before sending it |
| The full briefing of the report | In the cloud, with permission | ONLY_IN_CLOUD |
A long document that does not fit the on-device context window (9,216 tokens) |
| Answers in Catalan | In the cloud, with permission | ONLY_IN_CLOUD |
Gemini Nano does not write Catalan. Without permission, the answer comes in Spanish, on the device, with a note saying why |
| Prompts over 12,000 characters | In the cloud, with permission | ONLY_IN_CLOUD |
They do not fit on the device |
| Browsers with no on-device model | In the cloud, with permission | ONLY_IN_CLOUD |
There is no Gemini Nano to use |
The privacy promise is in the code, not only in the text.
- Without the person's permission, the only inference mode is
ONLY_ON_DEVICE, which cannot make a network request. - There are two Firebase apps.
keeper-deviceserves on-device models and needs no Firebase project.keeper-cloudis created only after the person allows the cloud. App Check, Remote Config and Installations exist only inside it. - Before any text goes to the cloud, Workray removes the personal data it recognizes (emails, phone numbers, identity documents, bank accounts, addresses). It uses the same cleaner the engine applies to every story. If the cleaner cannot load, nothing is sent.
- Withdrawing the permission deletes the cloud app and what the SDK stored in the browser.
The answer's origin comes from the SDK. Each badge, "On this device" or "Gemini in the cloud", is read from the response's inferenceSource, not guessed by the app.
Structured output and streaming on both sides. Tasks that need structure return JSON constrained by a schema: responseJsonSchema in the cloud and responseConstraint on the device. Explanations stream with generateContentStream. The on-device model is downloaded from the person's gesture, with progress, through initializeDeviceModel.
App Check protects every cloud call. Development uses a debug token. The public site uses a production provider.
Remote Config sets three values without a new release: the cloud model (keeper_cloud_model), a switch to turn the cloud off (keeper_cloud_enabled) and the on-device prompt limit (keeper_device_max_chars). A missing or out-of-range value falls back to the default in the code, so a mistake in the console cannot break the app.
Firebase Hosting serves the static site at https://workray.web.app.
Features
- Your story in your own words, in English, Spanish or Catalan, understood on the device.
- A photo of your CV or of a job offer, read only on the device.
- Adaptive questions from a Bayesian engine, asked by Workray AI in plain words.
- The official occupation from ESCO and ISCO-08, matched in the browser using three engines plus fusion:
- semantic vectors distilled from Google's EmbeddingGemma;
- a phrase classifier;
- Bayesian questions;
- calibrated fusion of the engine results.
- A task-by-task report: exposure to generative AI (ILO), the job market (INE, SEPE, Generalitat de Catalunya) and official training.
- Workray AI explains the report, answers questions about it and writes the full briefing, with the source of each answer visible.
- A course advisor that only suggests courses from the catalog.
- A summary of the report without a connection.
- A clear choice when you arrive: Workray AI on this device, in the cloud, or not at all.
- Works offline once installed; no account; "Erase everything" removes all local data.
- A printable two-sheet report: the AI exposure and the job market.
How we built it
Workray starts from Faro, a career guidance web app in Spanish and Catalan by the same author (see "Pre-existing code" below). The engines, the data and the journey run in the browser. The occupation and training engines are written in TypeScript, and a Python data platform rebuilds the official data package. Every file of the package is checked by its SHA-256 hash against a manifest.
During the contest we added:
- English as a third language, with English labels taken only from official sources (ILO and ESCO);
- Workray AI, the hybrid layer on Firebase AI Logic: routing, consent, scrubbing, source badges, Remote Config and App Check;
- a static build for Firebase Hosting.
The Workray AI module is plain JavaScript with type checks and has its own test suite. The tests run against a double of the SDK, to prove what is called and what is never called before consent.
Challenges we ran into
- The on-device window. Gemini Nano in Chrome has a 9,216-token context window and one turn per request. The facts of a report are kept under about 1,500 tokens, and a follow-up question carries the last three questions and answers inside the prompt.
- Languages. The on-device model reads and writes English, Spanish, French, German and Japanese, but not Catalan. The routing rule had to give Catalan speakers a fair choice: Catalan from the cloud with permission, or Spanish on the device with a note.
- Keeping the cloud truly off. The SDK's cloud services must not start before consent. We split the work into a device app and a cloud app, and load App Check and Remote Config only inside the cloud app.
- Four AIs that agree. Each engine sees the story in its own way. A calibrated fusion joins their results, and the Bayesian engine asks one more question when they disagree.
Accomplishments that we're proud of
- The source of every answer is visible and comes from the SDK itself.
- The whole journey works without Workray AI, and the on-device route works offline.
- Measured on Chrome 157 with Gemini Nano: a session gives its first answer in about 2 seconds, a JSON answer takes about 6 seconds, and a streamed answer shows its first words after about 0.7 seconds.
- The occupation engine gives the same results after all the changes. Its measurement bank of 2,112 sentences and 2,473 simulated people gives the same reference fingerprints.
- 5,755 Node tests, 47 browser tests in Chromium, Firefox and WebKit, and 4,471 Python tests pass.
What we learned
- A hybrid SDK makes the privacy decision a line of code: the inference mode. Writing that decision as one pure function made it testable and easy to explain.
- On-device models are good at understanding and rephrasing short personal text. Long documents and languages the model does not write are better sent to the cloud, with the person's permission.
- People trust an AI answer more when they can see where it was made and check the data it explains.
What's next
- A live control panel for public employment services that host Workray (today the jury sees a read-only demo with example data).
- More countries: the ILO index is worldwide, so the next step is each country's official job and training data.
Pre-existing code
Workray is built on Faro 1.0.0, an earlier engine by the same author, who keeps full ownership. It existed before the submission period. The first commit of the repository is the Faro 1.0.0 source. Faro 1.0.0 brought:
- the occupation engine, with three engines (EmbeddingGemma vectors, a phrase classifier and Bayesian questions) plus calibrated fusion, and the training engine, all running in the browser;
- the official data package (ESCO, ILO, INE, SEPE, Generalitat de Catalunya and others), with the data platform that rebuilds it;
- the installable PWA with its verified offline copy, local reports and printable PDFs, in Spanish and Catalan.
On November 23, 2026, we also brought in later improvements to Faro by the same author: training, the report, the panel and the data platform. They are recorded as one merge commit.
Built during the submission period:
- English as a third language across the interface, the report and the data;
- Workray AI, the generative AI layer on Firebase AI Logic hybrid inference: the routing rule, the consent flow, personal-data scrubbing before the cloud, source badges, App Check and Remote Config;
- the static site for Firebase Hosting, with the Cloudflare deployment and the remote updates removed;
- the Workray brand and design, the choice of where the AI works, the conversation with the Bayesian engine, the photo of a CV or a job offer read on the device, the course advisor, the full briefing on the device and the read-only panel demo.
The commit history keeps the real dates, so each change can be checked. We used AI coding assistants, which the rules allow.
Try it
- Live demo: https://workray.web.app (Chrome on a desktop shows the on-device route; any browser can use the cloud with permission)
- Code (Apache-2.0): https://github.com/Workrayok/workray
Built With
- css3
- embeddinggemma
- firebase
- firebase-ai-logic
- firebase-app-check
- firebase-hosting
- firebase-remote-config
- gemini
- gemini-nano
- html5
- javascript
- kaggle
- pwa
- python
- service-worker
- typescript