Scaling Email Content Extraction Using LLMs in Production

yahoo · Tech · 2023 · source Agentic: no · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: consumer email content extraction

Yahoo Mail needed to break through a coverage ceiling in receipt and package extraction across billions of daily emails while preserving privacy and production reliability.

Constraints:

Architecture

Yahoo deployed LLM-based extraction on Google Cloud Vertex AI with a hybrid on-prem/cloud architecture. Their Yahoo private-cloud pipelines sample live traffic, compare legacy and LLM models, copy test/training data to GCS, fine-tune and serve models through Vertex AI endpoints, connect Vertex endpoints back into the on-prem extraction pipeline, and use error analysis plus active learning for model improvement.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  A["Yahoo Mail messages"] --> B["On-prem extraction pipeline"]
  B --> C["Legacy sequence model"]
  C --> D["Live traffic comparison"]
  B --> H["Vertex AI endpoint"]
  H --> D
  D --> K["Go/no-go release gate"]
  F["Yahoo private-cloud data"] --> E["GCS training store"]
  E --> G["Vertex AI notebook"]
  G --> H
  B --> I["Error analysis tool"]
  I --> J["Active learning loop"]
  J --> G
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Yahoo Mail messages Incoming email corpus containing receipts, package updates, and long-tail sender formats. On-prem extraction pipeline
On-prem extraction pipeline Existing production pipeline that integrates legacy extraction and Vertex AI LLM calls. Yahoo Mail messages, Vertex AI endpoint, Error analysis tool
Legacy sequence model Existing production extractor used for comparison and baseline coverage. On-prem extraction pipeline, Live traffic comparison
Live traffic comparison Runs legacy and LLM models on sampled live traffic for release decisions. Legacy sequence model, Vertex AI endpoint, Go/no-go release gate
GCS training store Cloud storage for copied test and training data. Vertex AI notebook, Yahoo private-cloud data
Yahoo private-cloud data Private-cloud source of test and training data. GCS training store
Vertex AI notebook Fine-tuning and experimentation environment with GPU access. GCS training store, Vertex AI endpoint
Vertex AI endpoint Production LLM inference endpoint deployed across US regions. Vertex AI notebook, On-prem extraction pipeline, Live traffic comparison
Error analysis tool Monitors model errors and feeds active-learning improvements. On-prem extraction pipeline, Active learning loop
Active learning loop Uses feedback and error analysis to improve the model. Error analysis tool, Vertex AI notebook
Go/no-go release gate Release decision gate informed by sampled traffic comparisons and validation. Live traffic comparison

Data flow

Live Yahoo Mail extraction traffic is sampled and run through both the existing production model and the new LLM model for go/no-go comparison. Training/test data moves from Yahoo private cloud to GCS, Vertex AI notebooks and endpoints support model fine-tuning and serving, the on-prem extraction pipeline calls the Vertex endpoint, and error analysis plus user feedback feeds an active-learning loop.

3 supporting quotes
“we sample a small percentage of our life traffic and run both the model on that sample size to test the quality before we make a go or no go decision”transcript, stated
“the private cloud of Yahoo where we had the test and training data which got copied to the GCS which could be used for training the model by our notebook”transcript, stated
“Finding uh right network configuration so that the vertex end point could be accessed from our on-prem extraction pipeline”transcript, stated

Why this architecture

Yahoo chose a hybrid Vertex AI/on-prem architecture because the existing mail extraction stack and user data remained in Yahoo infrastructure, while Vertex AI provided GPU access, managed endpoints, and cloud tooling needed for LLM training and inference at scale.

3 supporting quotes
“our infrastructure didn't have enough gpus to fine tune the llm models”transcript, stated
“we had many questions in our mind first of all what model to be used how do we do the batching what batch size is right for us”transcript, stated
“we deployed multiple uh vertex AI endpoint in various us reasons which was aligned to our traffic pattern”transcript, stated

Models used: Google PL5 250M parameter model · legacy sequence-to-sequence extraction model · Vertex AI fine-tuned LLM

Scale

Alternatives considered (roads not taken)

Continue legacy sequence-to-sequence models only

Rejected because: They hit an 80/20 coverage ceiling and failed to cover long-tail sender diversity.

“our old sequence to sequence machine learning model we say coverage ceiling”transcript, stated

Fine-tune LLMs only on Yahoo infrastructure

Rejected because: The existing infrastructure lacked enough GPUs for LLM fine-tuning.

“our infrastructure didn't have enough gpus to fine tune the llm models”transcript, stated

Blind rollout without live-traffic comparison

Rejected because: The hybrid migration needed a sampled quality comparison before go/no-go decisions.

“run both the model on that sample size to test the quality before we make a go or no go decision”transcript, stated

Patterns

canary-rollout (deployment)

Yahoo sampled live traffic and compared legacy and LLM extractors before go/no-go rollout decisions.

“we sample a small percentage of our life traffic and run both the model on that sample size to test the quality before we make a go or no go decision”transcript, stated

fine-tuning-adaptation (model-development)

The team used Vertex AI notebooks and GPUs to fine-tune an LLM-based extractor for Yahoo Mail extraction.

“what we decided to use vertex manual maining through vtex AI notebook which have access to the latest gpus A1 100”transcript, stated

data-quality-loop (operations)

Yahoo connected error analysis and user feedback into an active-learning loop for model improvement.

“how do we take feedback from the user and take that Active Learning Loop and make model better with that active learning”transcript, stated

privacy-preserving-processing (governance)

The extraction architecture prioritized secure, legal, and privacy-compliant handling of mailbox data.

“mail extraction involves the user data from their mailboxes so it is our utmost priority to build solutions that are secure and are legally and privacy compliant”transcript, stated

Tradeoffs

Model modernization

Chose LLM extraction through Vertex AI over legacy sequence-to-sequence extractors alone.

Rationale: LLMs addressed the long-tail coverage ceiling and freshness requirements.

“we decided to try out large language models to evolve male extractions it was very clear we're up to something great”transcript, stated

Release validation

Chose sampled live-traffic comparison over offline-only launch confidence.

Rationale: Production comparison caught a November-release issue before the successful December release.

“this post validation step was very crucial for us as it helped us figuring out a problem that we were having in November release”transcript, stated

Serving deployment

Chose multiple Vertex AI endpoints across US regions over single endpoint deployment.

Rationale: Endpoint placement was aligned to Yahoo's traffic pattern for scale.

“we deployed multiple uh vertex AI endpoint in various us reasons which was aligned to our traffic pattern”transcript, stated

Gotchas (what bit them)

Top-sender coverage hid long-tail user pain.

Root cause: The 80/20 sender distribution made aggregate coverage look acceptable while missing individual receipts or packages still broke user trust.

Resolution: Use LLM extraction to expand coverage beyond the top-sender ceiling.

“we have like 80% of coverage that's not too bad we were entirely wrong consumers it takes one missing receipt one wrong update about one package and then they will lose trust”transcript, stated

Six-month retraining was too slow for email commerce data.

Root cause: New receipts, packages, and sender formats arrive continuously.

Resolution: Move to a faster GenAI/Vertex experimentation and release process.

“there's new emails arriving new receipts arriving new packages arriving it cannot take us more than six months to retrain those models”transcript, stated

Hybrid on-prem/cloud integration was more complex than expected.

Root cause: Yahoo was mid-cloud transformation, with systems partly on-prem and new solutions in Vertex AI.

Resolution: Build network configuration, validation, and privacy controls between the on-prem extraction pipeline and Vertex endpoints.

“when your systems are partly on Prem and partly on uh new new state it makes the problem much more complex that we originally thought”transcript, stated

Evaluation

Yahoo evaluated model changes by comparing legacy and LLM extractors on sampled live traffic, post-validation before release, error analysis, extraction richness, domain coverage, and tracking API errors.

Metrics: go/no-go sampled quality · standard-domain coverage · tail-domain coverage · daily receipt extractions · daily package extractions · extraction richness · tracking API error reduction

“run both the model on that sample size to test the quality before we make a go or no go decision”transcript, stated
“51% when I say extraction richness it means more attribute per extraction”transcript, stated

Outcomes

The system runs over consumer email at Yahoo Mail scale, which the source describes as billions of daily messages and hundreds of millions of mailboxes.

3 supporting quotes
“almost 3 and a half million new purchase reset extraction on daily basis and covering 94% of the standard domain”transcript, stated
“we were able to extract 5.5 million of new packages with covering almost 99% of the tail domain”transcript, stated
“along with that we see 16% reduction in our tracking API error”transcript, stated