How AI Scaled Localization with Context and Validation

Peter Bubenik Β· Salesforce Engineering Β· Β· Source
Image for How AI Rebuilt Salesforce’s Decades-Old Localization Pipeline

After studying this material, you should be able to:

  1. Explain why prompt engineering alone is insufficient for enterprise AI applications
  2. Describe the architecture of a multi-stage AI orchestration pipeline
  3. Understand the role of context engineering as a structural component, not just a prompt improvement technique
  4. Identify how human expertise is transformed (not replaced) in AI-powered workflows
  5. Apply these principles to designing trustworthy AI pipelines in complex, real-world domains

Step-by-Step Teaching

Step 1: Understand the Problem Space

The Core Challenge

Before learning the solution, you must understand why this problem was hard.

Salesforce needed to translate software into 34 languages per release. The constraints were:

FactorReality
Volume growth+35% between releases
BudgetFixed
Release windowFixed
Quality standardProduction-grade software

πŸ”‘ Key insight: The problem was not simply "translate faster." The system had already been optimized for decades. The question became: How do you reinvent an entire production pipeline using AI without breaking quality or schedules?

Why This Was Harder Than It Looks

You might assume: "Just use ChatGPT to translate."

Here is why that fails at enterprise scale:

  • Customers rename platform objects (e.g., "Account" β†’ "Patient"), and every surrounding sentence must remain grammatically correct across 34 languages
  • Each product (Sales Cloud, Health Cloud, Slack) has different vocabulary, tone, and user expectations
  • Salesforce has specific branding, formality standards, and regional conventions
  • A single mistranslated UI string ships to millions of users worldwide

🧠 Mental model: Think of translating software like translating a legal contract, not a casual email. Every word carries functional and contextual weight.


Step 2: Understand Why Prompt Engineering Alone Failed

The First Instinct (And Its Limits)

The team's first approach was to improve prompts. This is the most common starting point for AI engineering.

The pattern they discovered:

Fix branding in prompt β†’ Grammar breaks
Fix grammar β†’ Product context is lost
Fix product context β†’ Terminology inconsistent across products

This is called the whack-a-mole problem in prompt engineering. Solving one dimension breaks another.

The Critical Realization

"The breakthrough was combining prompt engineering with context engineering to create an AI orchestration pipeline, not better prompt engineering alone."

This is the central lesson of the entire article. Write it down.

ApproachWhat It DoesWhy It's Insufficient Alone
Prompt EngineeringTells the model how to behaveCannot carry enough structured information for complex domains
Context EngineeringGives the model what it needs to knowMust be architecturally embedded, not just appended to prompts
AI OrchestrationSequences specialized stagesCombines both into a reliable production system

Step 3: Learn the Architecture β€” The Multi-Stage AI Pipeline

How the Pipeline Works

Instead of one translation request, the system runs a sequence of specialized AI stages:

Stage 1: Establish grammatical rules + language conventions
        ↓
Stage 2: Load Salesforce terminology + branding guidelines
        ↓
Stage 3: Inject product context (Which cloud? Which feature?)
        ↓
Stage 4: Generate translation
        ↓
Stage 5: AI Editor reviews output
        ↓
Stage 6: AI Validator checks terminology, quality, consistency
        ↓
Stage 7: Human review + feedback loop
        ↓
        PRODUCTION

πŸ“Œ Scale fact: A single translation can pass through up to 85 specialized prompt stages before reaching production.

Why Stages Matter

Each stage is specialized, meaning it does one job well rather than one stage doing everything poorly.

Think of it like a manufacturing assembly line:

  • A car factory does not have one robot build the entire car
  • Each station handles one precise task
  • Quality is checked at multiple points, not just at the end

The same logic applies here. AI orchestration is pipeline engineering, not just AI engineering.


Step 4: Understand Context Engineering as Architecture

What Context Engineering Actually Means

This is the most important concept to internalize.

Context engineering is not just writing longer prompts.

It means structuring and delivering the right information to the model at the right stage, so the model understands:

  • What it is translating (a button label, an error message, a tooltip)
  • Where it lives (Sales Cloud, Health Cloud, Slack)
  • Who will read it (enterprise healthcare users vs. sales professionals)
  • Why it exists (what customer action it supports)

Context as Infrastructure

The team repurposed existing human-facing assets:

Original PurposeNew Role in AI Pipeline
Style guides for human translatorsStructured context fed to LLMs
Glossaries and terminology databasesConsistency enforcement across stages
Branding guidelinesInjected at generation and validation stages
Linguistic conventionsApplied per-language at early pipeline stages

πŸ”‘ Key insight: "Context wasn't simply improving prompt quality. It had become part of the architecture itself."

This means context engineering decisions affect system design, not just individual prompts.


Step 5: Understand the Validation Pipeline

Why Validation Is Its Own System

Generating a translation is only half the work. Trusting that translation enough to ship it is the other half.

The validation pipeline mirrors the generation pipeline in importance:

AI Generation β†’ AI Editing β†’ AI Validation β†’ Human Review

Each layer checks different things:

  • AI Editing: Refines tone, grammar, consistency
  • AI Validation: Checks against terminology databases, branding rules, quality thresholds
  • Human Review: Does not simply approve/reject β€” humans refine prompts, context data, and validation rules

The Feedback Loop

Human reviewer finds issue
        ↓
Identifies whether it's a prompt problem, context problem, or validation gap
        ↓
Updates the relevant pipeline component
        ↓
Every future release benefits automatically

🧠 Key principle: Human expertise was not removed. It was elevated from doing translation to improving the system that does translation.


Step 6: Recognize the Broader Engineering Challenges

AI Created New Engineering Problems

Faster AI output broke downstream systems:

  • Batching strategies had to change because output volume increased dramatically
  • Source control needed updating for higher-frequency content delivery
  • Testing and deployment pipelines needed redesign
  • Database capacity became a constraint

πŸ“Œ Lesson: When you introduce AI into a production system, you are not just solving the AI problem. You are reengineering the entire surrounding system.

The Pipeline Must Evolve With Models

Foundation models improve constantly. The architecture was designed so that:

  • Prompt engineering, context data, and validation rules are modular
  • When the underlying model changes, the team does not rebuild everything from scratch
  • The system improves as models improve, rather than breaking

Step 7: Synthesize the Core Lessons

Lesson 1: Context Is Architecture

Do not treat context as an afterthought to prompting. Design your system around what information the model needs, when it needs it, and how it is structured.

Lesson 2: Orchestration Over Single Prompts

Complex real-world tasks require sequences of specialized AI stages, not one powerful prompt.

Lesson 3: Validation Is Non-Negotiable

Production AI systems require multi-stage validation pipelines, not just generation pipelines.

Lesson 4: Human Expertise Is Transformed, Not Replaced

"AI did not replace decades of localization expertise. It transformed that expertise into prompts, contextual intelligence, validation pipelines, and engineering workflows."

The domain knowledge still matters. AI makes it scalable and executable at enterprise speed.

Lesson 5: AI Systems Become Trustworthy Through Engineering

"AI systems don't become production-ready because foundation models improve. They become production-ready because engineers build the workflows, validation, and context that make those models trustworthy at scale."


Summary Table

ConceptSimple DefinitionWhy It Matters
Prompt EngineeringInstructions telling AI how to behaveNecessary but insufficient alone
Context EngineeringStructured information AI needs to perform correctlyBecomes part of system architecture
AI OrchestrationSequencing specialized AI stages into a pipelineEnables reliability at enterprise scale
Multi-stage ValidationAI + human review at multiple checkpointsBuilds trust in AI output
Feedback LoopHuman refinements improve future pipeline runsCompounds quality over time

βœ… You are now equipped to explain why enterprise AI systems require orchestration pipelines, why context engineering is an architectural decision, and how human expertise is transformed rather than eliminated when AI enters a production workflow.

More to study