Back to Case Studies

AI Job Extraction from Recruitment Emails

Locum Doctor Vacancies, Merged Across Agencies

ProductionHR & RecruitmentHealthcare & WellbeingJul 2025 – Feb 2026NLP, Knowledge Systems & Generative AI
5,000
Emails a day, with attachments
≥ 95%
Job-title extraction accuracy
≤ 4 s
Processing time per document
≤ 5%
Jobs sent to manual review

My Role

Role
Architect & tech lead
At Dataforest
Team
Me + 1 ML engineer + a PM
Stage reached
In production
Key decisions
  • Provider-agnostic LLM layer, model chosen per task
  • Merge duplicate jobs across agencies, never delete
  • Per-field confidence routes retries and human review

Approach at a Glance

Details
  1. 1Event-Driven Integration Only
  2. 2Parsing Every Format
  3. 3Provider-Agnostic LLM Layer
  4. 4Structured Extraction with Per-Field Confidence
  5. 5Merging Duplicates Across Agencies
  6. 6Human in the Loop
  7. 7Evaluation Against the Client's Targets
  8. 8Deployment in the Client's Cloud

Executive Summary

A production AI microservice for an Australian healthcare recruitment group that places locum doctors. Hospitals and recruitment agencies send the group thousands of job offers a day by email: in the body, in forwarded notifications, in PDF and Word attachments, often several jobs in one email, and often the same job from several agencies. Staff used to read them by hand and retype the details, which meant slow responses and missed placements.

The service reads every email and attachment, extracts each job into structured fields (title, hospital, specialty, grade, dates, shift pattern, rate, employment type, contacts), and passes them to the group's application. Three design decisions made it work at this volume:

  • A provider-agnostic LLM layer, so each task uses the model that gives the best balance of accuracy and cost.
  • Duplicates are merged, not deleted. The same job from different agencies becomes one record with the most reliable value for each field and all the sources kept.
  • Confidence per field, not per email. Only uncertain fields trigger a retry or a human review.

The service met all the field-level accuracy targets, including at least 95% for job titles. It processes a document in under 4 seconds and sends no more than 5% of jobs to manual review. I was the architect and tech lead, working with one ML engineer and a PM, from July 2025 to February 2026.


Client Profile

The client runs a locum doctor platform. Its value to doctors is seeing the best available shifts quickly. Its value to hospitals is filling them quickly. Both depend on turning a flood of emails into a clean list of jobs.

Why it was hard:

  • Volume and variety: up to 5,000 emails a day, from hospitals with their own formats, forwarded notifications from other systems, and narrative descriptions. Jobs come in the email body or in attached PDFs and Word documents.
  • Several jobs per message: one email or attachment can hold a list of vacancies, which must be split correctly.
  • The same job, many times: different agencies advertise the same shift with different wording and formatting. Showing it five times confuses doctors. Deleting the copies loses agency contacts and details.
  • Medical specifics: specialties, practitioner grades and hospital names follow conventions a generic model doesn't know, and a wrong grade or date makes a job useless.
  • Strict targets: the client set field-level accuracy targets, a speed limit per document and a maximum share of manual reviews before going to production.

Technical Approach

  1. Event-Driven Integration Only – The client's application and the AI service communicate only through Azure Event Hub. When a new email arrives, the application publishes a message with references to the email's content, metadata and attachments in blob storage. The AI service consumes it, processes the email and publishes the extracted jobs back, tagged with the same request ID. The ID also makes processing idempotent: an email delivered twice is recognised and not processed twice. The two systems can be deployed, scaled and changed independently.

  2. Parsing Every Format – The service reads the HTML and plain-text bodies and the attachments. Emails and documents with several vacancies are segmented into individual jobs before extraction.

  3. Provider-Agnostic LLM Layer – A thin abstraction layer gives the different LLM providers one interface. This avoids lock-in to one vendor and lets each task use the right model: a high-accuracy model for complex, messy emails and a cheaper one for high-volume standard formats. At up to 5,000 emails a day, that choice matters for both cost and speed.

  4. Structured Extraction with Per-Field Confidence – Each job is extracted into the fields the client's applicant tracking system imports, with a cleaned, standardised description. Every field gets its own confidence score. A low-confidence field triggers a fallback extraction, and if that is still uncertain, the job goes to manual review. A whole email is never rejected because one field is unclear, which kept manual reviews at 5% or less of jobs.

  5. Merging Duplicates Across Agencies – Jobs are embedded and compared with a field-weighted similarity: title, location, specialty, grade and dates count more than wording. Matching jobs from different agencies aren't deleted. They are merged into one composite record that takes the highest-confidence value for each field, while keeping every source with its agency's contact details. Doctors see each shift once, and nothing useful is lost.

  6. Human in the Loop – A review interface shows flagged jobs with the uncertain fields highlighted. Reviewers' corrections are recorded, giving a feedback loop for improving prompts and models.

  7. Evaluation Against the Client's Targets – Accuracy was measured with precision, recall and F1 per field against a manually annotated ground-truth set of job postings. The targets were set by the client before production: at least 95% for job titles, 90% for location, hospital and specialty, 85% for grade, dates and employment type, and 80% for shift pattern, rate and contacts, at no more than 4 seconds per document. All of them were met.

  8. Deployment in the Client's Cloud – The service runs on the client's Azure Kubernetes cluster, deployed with Helm through a Terraform template, with PostgreSQL for data, Redis for caching and background tasks, and Grafana with OpenTelemetry metrics and centralised logs for monitoring.


Business Outcome

The recruitment group replaced manual reading and retyping of thousands of emails a day with a production service that turns every email into clean, structured jobs in under 4 seconds per document. Every field-level accuracy target was met, with at least 95% for job titles, and only 5% or less of jobs need a human. Duplicates from different agencies became single, richer job records, so doctors see each shift once with the best available details.

Because the service talks to the client's application only through events, the client's team can keep developing its platform independently, and the AI side can change models or scale on its own.

Technologies

LLMsInformation ExtractionEmbeddingsDeduplicationHuman-in-the-LoopAzure Event HubAKSTerraformPostgreSQLRedisGrafanaFastAPI

Planning something similar?

Tell me about it on a short call. New projects can start within 2 weeks