Bilingual Named Entity Recognition for Cargo Logistics Using Model Distillation

ibs_software · Other · 2026 · source Agentic: no · promotional bias: med · source-backed · extracted with prompt 0.5.4 (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: Bilingual cargo logistics entity extraction

IBS Software needed a production NER system that could extract 23 cargo logistics entity types from thousands of daily English and Japanese emails while keeping accuracy, latency, and inference cost suitable for real-time operations.

Constraints:

Architecture

IBS used Amazon Bedrock managed model distillation to transfer a Nova Pro teacher model into a cheaper Nova Lite student model. The production pipeline ingests .eml files in S3, uses Lambda for preprocessing, invokes the distilled Bedrock model for NER, applies confidence and validation rules, and stores structured extracted entities in DynamoDB.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  cargo-email-source[Cargo email source] --> amazon-s3-ingestion[Amazon S3 ingestion]
  amazon-s3-ingestion --> aws-lambda-preprocessing[AWS Lambda preprocessing]
  aws-lambda-preprocessing --> bedrock-nova-lite-endpoint[Bedrock Nova Lite endpoint]
  distillation-training-set[Distillation training set] --> bedrock-nova-lite-endpoint
  bedrock-nova-lite-endpoint --> post-processing-rules[Post-processing rules]
  post-processing-rules --> dynamodb-output[DynamoDB output]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Cargo email source English and Japanese cargo logistics emails requiring entity extraction. Amazon S3 ingestion
Amazon S3 ingestion Stores incoming .eml files for processing. Cargo email source, AWS Lambda preprocessing
AWS Lambda preprocessing Extracts email body and metadata before inference. Amazon S3 ingestion, Bedrock Nova Lite endpoint
Bedrock Nova Lite endpoint Distilled student model that performs token-level NER inference. AWS Lambda preprocessing, Post-processing rules
Post-processing rules Applies validation, regex patterns, and confidence thresholds. Bedrock Nova Lite endpoint, DynamoDB output
DynamoDB output Stores structured extracted entity JSON. Post-processing rules
Distillation training set 500 annotated bilingual cargo emails used to train the student model. Bedrock Nova Lite endpoint

Data flow

Cargo emails arrive as .eml files in S3. Lambda extracts email body and metadata, the Bedrock endpoint runs the distilled Nova Lite model, the model returns 23 entity types with confidence scores, post-processing applies validation rules and thresholds, and structured JSON entities are written to DynamoDB.

3 supporting quotes
“Email ingestion: Cargo email messages arrive as .eml files in Amazon S3. 2. Preprocessing: AWS Lambda extracts email body and metadata.”article, stated
“Inference: Amazon Bedrock endpoint processes text with distilled Nova Lite model. 4. Entity extraction: Model returns 23 entity types with confidence scores.”article, stated
“Output: Structured JSON with extracted entities stored in Amazon DynamoDB. import boto3 import json bedrock_runtime = boto3.”article, stated

Why this architecture

Managed distillation let IBS keep most of the teacher model's extraction quality while cutting inference cost and avoiding custom open-source training/deployment infrastructure. Serverless AWS components fit the email workflow and allowed the team to add validation and human review around the distilled model.

3 supporting quotes
“The distilled Nova Lite model retained 98 percent of the teacher’s performance while providing 14x cost reduction in production inference.”article, stated
“IBS Software deployed all infrastructure using Amazon Bedrock managed services, which bypassed the need for custom model hosting infrastructure.”article, stated
“Our key takeaway was that Amazon Bedrock managed distillation capabilities alleviated the complexity of open-source frameworks.”article, stated

Models used: Amazon Nova Pro · Amazon Nova Lite

Scale

Alternatives considered (roads not taken)

Use open-source distillation frameworks such as PyTorch and TextBrewer

Rejected because: They created complexity around bilingual distillation, hyperparameters, infrastructure, and production workflow integration.

“Initially, the team attempted knowledge distillation using open-source frameworks including PyTorch-based implementations and the TextBrewer library.”article, stated

Serve the larger Nova Pro teacher model directly

Rejected because: The Nova Lite student retained most of the teacher performance while reducing inference cost 14x.

“We pivoted to Amazon Bedrock Model Distillation, using Amazon Nova Pro as the teacher model and Nova Lite as the student model.”article, stated

Trust model output without post-processing

Rejected because: The team added rules and confidence thresholds for known formats and low-confidence predictions.

“We also applied post-processing rules for known entity patterns (AWB format, flight number regex) and implemented confidence thresholding”article, stated

Patterns

model-distillation (model-ops)

A Nova Pro teacher was distilled into a Nova Lite student for cheaper NER inference.

“using Amazon Nova Pro as the teacher model and Nova Lite as the student model”article, stated

confidence-thresholding (quality-control)

Low-confidence entity predictions are flagged for human review.

“implemented confidence thresholding to flag low-confidence predictions for human review.”article, stated

human-in-the-loop-gate (governance)

Low-confidence predictions route to human review rather than being accepted automatically.

“flag low-confidence predictions for human review.”article, stated

structured-output-contract (interface-design)

The pipeline emits structured JSON containing extracted cargo entities.

“Structured JSON with extracted entities stored in Amazon DynamoDB.”article, stated

Tradeoffs

Teacher/student model choice

Chose distilled Nova Lite over direct Nova Pro production inference.

Rationale: The student retained 98 percent of teacher performance while reducing cost 14x.

“retained 98 percent of the teacher’s performance while providing 14x cost reduction in production inference.”article, stated

Managed training platform

Chose Amazon Bedrock Model Distillation over PyTorch/TextBrewer custom pipelines.

Rationale: Managed infrastructure simplified training, monitoring, evaluation, and workflow integration.

“Managed training infrastructure with automatic hyperparameter optimization.”article, stated

Gotchas (what bit them)

Open-source distillation added too much production friction.

Root cause: Bilingual token-level distillation, hyperparameter tuning, infrastructure, and workflow integration were all hard to manage manually.

Resolution: Pivot to Amazon Bedrock managed distillation.

“Complexity in configuring distillation pipelines for bilingual data.”article, stated

Japanese extraction accuracy lagged English.

Root cause: Kanji combinations, absent spaces, fewer Japanese examples, and embedded multi-line entities made boundaries ambiguous.

Resolution: Augment Japanese data and add post-processing plus confidence thresholds.

“This gap came primarily from complex kanji character combinations in commodity descriptions, ambiguous entity boundaries in Japanese text without spaces”article, stated

Evaluation

IBS evaluated the teacher and student models with F1-score on a manually annotated bilingual test set, monitored training loss, analyzed language-specific error gaps, and checked real-time processing latency.

Metrics: 95.085 percent F1-Score · 98 percent teacher performance retained · 14x cost reduction · loss 0.05 to 0.008 · under 2 seconds processing

“Validated 95.085 percent F1-Score on test set.”article, stated
“The training process reduced loss from 0.05 to 0.008 over 70 steps”article, stated

Outcomes

The system processes thousands of daily bilingual cargo logistics emails and extracts 23 entity types.

“The system achieves 95.085 percent F1-Score while reducing operational costs by 14x.”article, stated
“Production deployment with AWS Lambda and Amazon S3 integration required minimal custom infrastructure.”article, stated