From Prompt Chains to Agents: My Three‑Stage Journey Building an AI Translation Skill
The author chronicles a two‑year evolution of an AI‑powered translation skill, moving from simple prompt‑based translations to model‑rewriting and finally to an agent‑driven workflow that handles diverse inputs, chunking, terminology consistency, quality grading, and personalized configurations.
Three Phases of AI Translation
Before inference models, translation relied entirely on handcrafted prompts. Two‑step prompting (literal translation then idiomatic rewrite) and three‑step prompting (literal, review, idiomatic) improved quality but consumed many tokens.
After inference models appeared, the core prompt shifted to a single word “rewrite”. Asking the model to rewrite the source in the target language gives it freedom to handle metaphors and restructure sentences, resulting in noticeably better quality.
In the Agent era, decisions such as chunk size, terminology tables, and quality thresholds are delegated to Agents while a human remains the quality judge and direction commander.
Agent Translation Workflow
Agent analyzes the article, extracts terminology, cultural metaphors, and background knowledge, and saves an analysis file.
Based on the analysis and a prompt template, it generates a translation prompt and saves it.
If the article is long, a script splits it by Markdown structure.
Multiple sub‑Agents translate their assigned chunks in parallel.
Translations are merged and a final proofread is performed.
All intermediate results—analysis reports, prompts, chunk texts, draft translations, review comments—are persisted as files, enabling selective re‑translation of problematic chunks without restarting the whole process.
Agent Translation vs Prompt‑Only Translation
Prompt‑only translation packs source, instructions, and terminology into a single context, quickly hitting token limits for long documents. Agent translation differs in three ways:
Workflow‑driven execution : Agents follow a designed skill flow, adapting chunking strategies, handling different file types, and generating scripts for AST parsing when needed.
File‑system as external memory : Analysis reports, prompts, and chunk results are persisted as files; agents read only what they need, keeping the runtime context clean.
Parallel sub‑Agents : Multiple agents work on separate chunks simultaneously, reducing latency while sharing a common prompt file to guarantee consistency.
Translation Modes
Fast mode – No analysis or chunking, direct translation for quick gist.
Normal mode – Analyze content, extract terminology, auto‑chunk long texts, translate, then ask whether to continue polishing.
Fine mode – Same as normal mode but adds a review step, revises based on critique, and performs final polishing.
The default is Normal mode; users can upgrade to Fine mode after seeing the initial result.
From Serial to Parallel Translation
Initially chunks were translated serially, preserving context but being slow. Parallel translation speeds up processing but can cause inconsistent terminology. The solution moves consistency guarantees from runtime context to pre‑analysis: a single analysis report and shared prompt file ensure all agents use the same terminology and style.
Chunking was refined from naïve empty‑line splits (which broke tables and code) to Markdown‑AST‑aware splits at safe boundaries such as paragraph ends or after headings.
Four Iterations of Prompt Passing
Version 1 : Sub‑Agents read the analysis file themselves, adding uncertainty.
Version 2 : Main Agent assembles a full prompt and passes it as a parameter, but the prompt remains invisible for inspection.
Version 3 : The assembled prompt is saved to a file; sub‑Agents read the file, making the prompt a traceable artifact.
Version 4 : Prompt is split into a shared context file (background, terminology, principles) and a task‑specific instruction file (which chunk to translate and where to store the result), preventing sub‑Agents from being confused by unrelated chunk information.
Persisting All Artifacts
Every step produces a file, numbered to reflect order: 01-analysis.md – Content analysis 02-prompt.md – Translation prompt 03-draft.md – Initial translation 04-critique.md – Review comments 05-revision.md – Revised translation translation.md – Final output
This file‑based approach enables selective re‑translation, manual prompt tweaks, and seamless mode upgrades.
Agent‑Driven Error Discovery
"The Swiss had been watching the Japanese in the rear view mirror all through the 1960s, and they'd been improving at an alarming rate."
The model initially rendered a literal metaphor and missed the nuance of "alarming". Providing a high‑quality reference translation let the Agent compare and add rules such as "translate metaphors by intent, preserve emotional tone, and use Chinese emphasis structures instead of word‑by‑word mapping".
Personalization
An EXTEND.md file lets users set default target language, style, audience, and terminology tables. The system adapts translation strategy based on the declared audience (technical, general, academic).
Term‑Table Refinement
The original 60‑entry term table was trimmed to 15 critical entries, removing obvious translations (e.g., "Machine Learning") and keeping only ambiguous or domain‑specific terms such as "AI Wrapper", "Hallucination", and "Moat".
Recurring Design Principles
Persist every artifact for traceability.
Separate concerns: analysis, translation, review.
Gradual user experience: start with Normal mode, upgrade to Fine mode on demand.
Prioritize parallelism while safeguarding quality via shared prompt files.
Treat prompts as code: versioned, inspectable, reusable.
Project repository: https://github.com/JimLiu/baoyu-skills
npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-translateSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
DeepNoMind
I’m Yu Fan, a tech leader with deep technical expertise and managerial vision. Formerly at Motorola, now at Mavenir, I’ve led teams for years, focusing on backend architecture and cloud-native solutions, staying abreast of AI and other frontier fields, and championing personal growth and lifelong learning.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
