Automatic Occupational Coding through Retrieval-Augmented Generation

Mathijs A. Langezaal, Egon L. van den Broek, Lukas P. A. Arts, Marcel Goldberg, Grégoire Rey, Melissa C. Friesen, Sarah J. Locke, Nathaniel Rothman, Qing Lan, Roel C. H. Vermeulen, Susan PetersarXiv 2026

This is a summary of the paper "Automatic Occupational Coding through Retrieval-Augmented Generation" by Langezaal et al.

TL;DR

Occupational health researchers need to turn messy, free-text job descriptions (like "I fix pipes in old buildings") into standardized codes to study how work kills or disables millions of people every year. This paper introduces OPERAG, a framework that uses Retrieval-Augmented Generation (RAG) to let an AI "read the manual" of job classifications, allowing it to code occupations with near-human accuracy without needing a massive, pre-labeled training database.

What Problem Does This Paper Address?

Every year, nearly 2 million people die from work-related exposures like silica dust or welding fumes. To prevent this, epidemiologists use Job Exposure Matrices (JEMs)—tools that link specific job titles to known hazards. But there’s a bottleneck: turning a respondent's free-text answer into a standardized code (e.g., ISCO-88) is a nightmare.

Manual coding is slow, expensive, and surprisingly inconsistent—even experts only agree with each other about half the time. Existing AI tools are "brittle": they work well on the specific data they were trained on, but their accuracy plummets (from ~70% down to ~20%) when they encounter a new dataset from a different country or industry. They are also stuck with whatever classification system they were originally taught.

Figure 1: Overview of characteristics of job descriptions, their attributes, answers from respondents, occupational classifications, and occupational codes. Screenshot of the OPERAS decision support system (Langezaal et al., 2025) showing three anonymized job entries from the AsiaLymph (Friesen et al., 2016) dataset is used.

Methods

The authors moved away from traditional supervised learning (where a model memorizes millions of examples) and toward Retrieval-Augmented Generation (RAG). Think of it as giving the AI an open-book exam.

  1. The Knowledge Base: They converted the official ISCO-88 "coding index" (the rulebook) into a searchable vector database.
  2. The Retriever: When a new job description comes in, the system uses a specialized embedding model to find the 30 most semantically similar entries in the rulebook.
  3. The Reranker: A "reasoning" Large Language Model (LLM) acts as an expert filter, narrowing those 30 candidates down to the top 5 by following specific coding rules (like "don't guess a specific sub-category if the description is too vague").
  4. The Classifier: The LLM performs Chain-of-Thought (CoT) reasoning to pick the single best code from the top 5. To ensure stability, the system runs this five times and takes a majority vote.

Datasets

The primary "stress test" for OPERAG was the AsiaLymph dataset. It contains over 36,000 real-world job descriptions originally collected in Chinese and translated into English. This is a classic "out-of-distribution" (OoD) challenge—the kind of messy, translated data that usually breaks traditional AI tools.

They also used the ISCO-88 classification system and two major JEMs (ALOHA+ and SHOCK) to evaluate how well the AI's codes translated into actual health risk assessments.

Key Insights and Ideas

  • The "Open Book" Advantage: By using RAG, the system doesn't need to be "retrained" to learn a new classification system. You just swap out the rulebook in the database.
  • Context is King: Unlike older tools that only look at job titles, OPERAG integrates the employer's name, the primary tasks, and the products made. This mimics how human experts work—knowing someone works for a "Pharmacy store" helps distinguish a "Manager" from a "Warehouse Clerk."
  • Reasoning over Memorization: The use of a reasoning-heavy LLM (Qwen3-14B) allowed the system to handle the hierarchical nature of job codes, effectively "deciding" when a description was too vague to be assigned a highly specific code.

Key Results

  • Near-Human Performance: On the most difficult, detailed level of coding (the 4th level), OPERAG hit 42.6% accuracy. While that sounds low, human experts only achieved 51–56% on this same difficult dataset.
  • Crushing the Competition: Existing state-of-the-art tools (like CASCOT or LabourR) only managed 17–26% accuracy on this "unseen" data.
  • High-Stakes Success: When it came to the ultimate goal—exposure assessment—OPERAG achieved 89.9% to 98.6% accuracy. This means that even if the AI got the specific job code slightly wrong, it almost always correctly identified whether the worker was exposed to a hazard.

Limitations and Future Work

The authors identify a few "hallucination" risks: because LLMs generate justifications post-hoc, they might provide a plausible-sounding reason for a wrong code, potentially misleading a human reviewer.

Additionally, if the correct code isn't in the initial "Top 30" retrieved from the database, the LLM has no way to find it. Future work aims to add "agentic" features—allowing the AI to autonomously browse the web to look up a company's size or industry when the provided description is too thin. They also hope to implement "confidence scores" so the AI can flag difficult cases for human intervention.

Summary updated

BibTeX
@misc{langezaal2026automatic,
  author = {Mathijs A. Langezaal and Egon L. van den Broek and Lukas P. A. Arts and Marcel Goldberg and Grégoire Rey and Melissa C. Friesen and Sarah J. Locke and Nathaniel Rothman and Qing Lan and Roel C. H. Vermeulen and Susan Peters},
  title = {{Automatic Occupational Coding through Retrieval-Augmented Generation}},
  year = {2026},
  eprint = {2611.31051},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.31051},
}
Figure