Technical Notice
This notice describes how the site estimates the OECD AI Capability Gap of a declared activity profile. It gives the equations, the constants, the validation protocol, the held-out results, and the limits of the method. The notice is in English because it targets a technical audience. The site interface is available in seven languages.
Scope and data
The site works on the 879 O*NET occupations that carry an OECD score. The O*NET 31.0 text database supplies 2084 detailed work activities and 17712 occupation-activity links. The median occupation has 20 activities. The OECD 2026 workbook supplies the total gap index and the reversed normalized index. The OECD states that the total gap index has an effective maximum of 23. The reversed normalized index is e = 1 - g / 23. A low gap means high exposure.
The site ranks all 879 occupations. It does not restrict the candidate pool to the occupations that the user chose. The chosen occupations only build the initial activity list.
Evidence model
The user declares a performed set P and a denied set Q. Every other activity is missing. A missing activity is not an absent activity. It does not enter the likelihood.
Each declared activity carries a positive weight. The weight is the O*NET frequency from 1 to 5 when the caller supplies one. Otherwise the weight comes from the priority table described below. With smoothing ε = 0.02, the probability that occupation o contains activity d is:
The weighted log-likelihood of the evidence under occupation o is:
The occupation score is the weighted geometric mean of the per-activity probabilities:
For non-empty evidence, so lies between 0.02 and 0.98. A single occupation that contains every performed activity scores 0.98. A single occupation that contains none of them scores 0.02.
Occupation score and candidate screening
The combined semantic and activity score orders candidates when semantic scores are available. Otherwise, the activity score orders candidates. Ties use the priority score:
Here r is the 1-based position in the declared order.
The top 60 occupations by the combined score s*o form the candidate set. The score uses 75% semantic similarity and 25% activity similarity. Without semantic scores, selection uses ℓo. Excluded occupations do not enter the candidate set.
Convex blend
The declared profile is a convex combination of occupation profiles. The weights θ are not negative and sum to one. For the candidate set C, the probability that the blend contains activity d is:
The blend maximizes the weighted log-likelihood:
F is concave on the simplex. Its gradient is:
Estimation algorithm
The model uses exponentiated gradient ascent. Let Go be the bracket in the gradient without the positive factor (1 − 2ε). The update is:
Zt normalizes the weights to one. The step is normalized by the largest gradient component. Dropping (1 − 2ε) rescales the step only. The page uses η = 0.4 and 320 iterations. The library default is η = 0.7. The update has no convergence test.
After the first optimization, the model sparsifies the support. It sorts the weights and keeps the smallest set K with at least 2 occupations, at most 6 occupations, and cumulative mass at least 0.9. If no such set exists, it keeps 6 occupations. The library default is 8. It renormalizes the weights and runs 240 more updates on the trimmed support.
If P equals the full activity set of one occupation and Q is empty, the model sets the weight of that occupation to one and skips the optimization. This is a maximizer of F, because every performed activity is present at probability 1 − ε.
Estimate and uncertainty
The gap and exposure estimates are:
The effective support is 1 / Σ θo2. A value near one means that one occupation carries the blend. A larger value means that several occupations share the weight.
Uncertainty is the sample standard deviation of 24 bootstrap refits. Each refit draws max(1, round(0.8 |P|)) performed activities and max(0, round(0.8 |Q|)) denied activities with replacement. Each drawn activity carries its weight. The refit repeats the full estimation.
Activity ranking questionnaire
The user selects the activities that they perform. The page then asks the user to split a group into three ordered buckets: more frequent, normal, and less frequent. The page repeats the split for every bucket with more than four activities. A bucket of four or fewer activities needs no question and keeps its bucket order.
The order is deterministic. The final order is the more frequent bucket, then the normal bucket, then the less frequent bucket. The same rule applies inside every bucket. Transitivity holds by construction: if A is in a higher bucket than B, and B is in a higher bucket than C, then A is above C.
A group above four activities must be split into at least two non-empty buckets. Otherwise the group does not shrink and the page disables the Confirm button.
A completed tree can be reviewed. The page shows every saved group question again with its saved buckets. A changed split rebuilds only that subtree.
The validation harness creates a true order, shuffles consecutive blocks of three or four activities, simulates the answers from the perturbed order, and checks that the page returns the perturbed order. The maximum displacement from the true order stays at three positions. The check runs with npm run check:ranking.
The order feeds the priority table described below. This step has no probabilistic model and no uncertainty estimate.
Priority weights
When the caller supplies no frequency map, the weight of a declared activity comes from the priority table. The table has 21 values. It is monotone non-increasing. It comes from O*NET importance ratings pooled over occupations and stretched linearly to the range 1 to 5. A declared activity at relative position q takes the linearly interpolated value τ(q).
The page passes the inferred activity order and the priority table. It does not expose a frequency control. The model API accepts an optional frequency map. A supplied frequency from 1 to 5 replaces the priority weight. A missing entry in a supplied map gets weight one.
Semantic similarity
Semantic similarity measures how closely profession titles relate in meaning. The pipeline converts English titles into embeddings, which are numeric representations of meaning. It precomputes a matrix of cosine similarities between all professions. Scores stay between zero and one, with negative cosine values set to zero. The browser loads this matrix locally and does not load an embedding model.
The encoder is OpenAI text-embedding-3-large. Cosine similarity compares the directions of the numeric representations. The pipeline caches 3,072 numbers per profession. It sends public profession titles to OpenAI only when it generates embeddings. The browser uses the precomputed matrix and does not receive the API key.
From the project root, run npm run build:semantic to rebuild the matrix from cached vectors without API requests.
For candidate occupation o and chosen profession r, let nro count their shared activities. The count uses their full activity sets, not only the activities that the user selects.
Here R contains the chosen professions, and S is the precomputed matrix. The weights sum to one for each candidate with shared activities. If the denominator is zero, the semantic score is zero. Duplicate selections count once. These scores do not depend on the page language.
The ranking combines the existing activity similarity with the semantic score:
The blend retains its prior with strength 20. A prior is an extra preference in the model. It now uses the semantic score:
The prior adds −β(1 − to) to the gradient of each support occupation. It lowers the weight of semantically dissimilar occupations and changes the gap estimate. It does not exclude them. Profession search retains fuzzy matching for typing errors.
Validation
The harness splits the 879 occupations with an FNV-1a hash of the O*NET-SOC code. It tunes the two hyperparameters on 547 occupations. It reports on 332 held-out occupations.
For each occupation, the harness draws a uniform random subset of n activities from the occupation. It treats them as performed and perturbs their order in blocks of 3 or 4. It adds 7 or 8 random denied activities that the occupation does not contain. It excludes the true occupation from the candidate pool, so the model cannot select it or copy its score. It supplies no frequency map. The weight comes from the priority table. It fits the model and compares the estimated exposure with the OECD exposure of the same occupation.
The following table shows the activity-only baseline.
| Activities n | Occupations | MAE | Within 0.05 | Mean support |
|---|---|---|---|---|
| 4 | 332 | 0.0541 | 0.560 | 2.95 |
| 10 | 318 | 0.0432 | 0.673 | 3.34 |
| 20 | 169 | 0.0411 | 0.722 | 3.89 |
With 15 percent of the sampled activities replaced by uniformly random activities, n = 20 gives MAE 0.0430, within 0.05 0.686, and mean support 4.19.
The thresholds are MAE at most 0.05 and at least 65 percent of estimates within 0.05. The check uses the n = 20 bucket. The harness writes data/dist/validation_report.json and exits non-zero when a threshold is missed.
The activity harness passes no semantic scores. Separate tests cover semantic weighting, zero overlap, matrix relationships, and ranking fusion. Run them with npm run check:title.
From the project root, run npm run validate -- --semantic. This mode includes semantic similarity in candidate selection and combination weights. It keeps the application parameters fixed: support limit 6, learning rate 0.4, semantic ranking weight 0.75, and prior strength 20. It uses the same split, random seeds, exclusions, and activity sampling as the baseline. The target profession supplies the semantic reference but remains excluded from candidates.
The following table shows the semantic results.
| Activities n | Occupations | MAE | Within 0.05 | Mean support |
|---|---|---|---|---|
| 4 | 332 | 0.0486 | 0.596 | 1.83 |
| 10 | 318 | 0.0427 | 0.679 | 2.99 |
| 20 | 169 | 0.0393 | 0.746 | 3.58 |
With 15 percent foreign activities and 20 declared activities, semantic validation gives MAE 0.0402 and 72.2 percent within 0.05. Both clean and noisy results meet the existing limits. The harness writes data/dist/validation_report_semantic.json.
What the validation does not show
- The true occupation is excluded from the candidate pool. The model cannot select it. The protocol still uses the true occupation's activities as evidence, so it measures estimation from a known profile, not generalization to unseen occupations.
- The harness samples evidence from the same occupation. It does not use real user profiles.
- Semantic validation assumes that the user selects the correct profession. It does not measure results for incorrect profession choices or combinations of selected professions.
- The harness uses the priority table and 7 or 8 random denied activities. It does not exercise the frequency path. Separate tests cover semantic similarity. The frequency path has no test.
- The bootstrap resamples activities, not users. The standard deviation is a sensitivity measure, not a confidence interval.
- The likelihood is not identifiable. Occupations with equal or nested activity sets give the same fit. The sparsification rule selects one maximizer.
- The OECD index is not a causal prediction. A low gap does not prove that AI will replace the occupation.
Reproduce
python3 pipeline/build_dataset.py --check
npm run check:semantic
npm run check:tuning
npm run validate
npm run check:priority
npm run check:title
npm run check:ranking
npm run verify
npm run verify includes the data and semantic artifact tests. It also runs the tuning, translation, model, ranking, and Playwright tests.
References
- O*NET 31.0, U.S. Department of Labor. onetcenter.org
- OECD, The OECD AI exposure measure, OECD Artificial Intelligence Papers No. 59, 2026. doi.org/10.1787/f3da0f0a-en
- OECD AI Capability Indicators data. aicapabilityindicators.oecd.org
- Model source:
web/js/model.js. - Ranking model source:
web/js/rank.js. - Validation harness:
validation/run_validation.js. - Priority harness:
validation/priority_check.js. - Title check:
validation/title_check.js. - Semantic preprocessing:
pipeline/build_semantic.py. - Embedding model: OpenAI text-embedding-3-large.
- Math rendering: KaTeX, MIT license,
web/vendor/katex.