Over the past few days, I have continued working on the A Tour of Go multilingual translation project.
One of the previous development focuses was protecting structures within the .article pages that should not be arbitrarily translated or modified by the large language model, such as inline code, link targets, preformatted code, emphasis structures, and .play directives.
The overall approach was roughly:
Complete course page
↓
Identify structures to protect
↓
Replace with protected token / sentinel
↓
GLM-5.2 full-page translation
↓
Restore protected token
↓
Unified automatic validation
↓
Pass → ready
Fail → retry / blocked
This solution has been working properly, and after multiple rounds of calibration using representative pages, the capabilities for structure protection, restoration, and validation have become increasingly complete.
However, as the protection rules continued to grow, I started to reconsider a more fundamental question:
Before feeding the input to the large language model, is it really necessary to do so much processing on the original course page?
On August 10, 2026, I conducted a real experiment specifically around this question.
The final result did not simply prove that “the new approach is better”; rather, it gave me a clearer understanding of how much to protect, where to protect it, and how to balance translation quality against program complexity.
1. What really made me reconsider the input architecture was the swap issue from the day before
Previously, I encountered an issue where inline code was displaced due to adjustments in Chinese word order.
However, this issue was later recognized, and the corresponding validation rules have been relaxed. Therefore, it was not the direct cause for reconsidering the input architecture this time.
What really started to make me seriously doubt whether “massive token protection is necessary” was the swap issue I encountered the day before.
To ensure that certain original contents were absolutely not modified by GLM-5.2, the program would first replace them with protected tokens, allowing the model to complete the full-page translation around these placeholders.
This approach has obvious advantages in terms of structural safety, but it also means:
Input the model actually sees
≠
A Tour of Go original page
When a real identifier like swap is replaced by a placeholder with no business semantics, the model can no longer directly understand:
swap
Whether it is a function name, a code identifier, or an ordinary English word.
The more complex the protection layer, the less real context the model can actually see.
More troublingly, the protection itself introduces new program logic:
Identify
→ Tokenize
→ Token integrity validation
→ Restore
→ Boundary handling
→ Order and quantity comparison
In other words, we originally added protection to prevent the large language model from making mistakes, but the protection system itself has started to become a complex subsystem that requires continuous maintenance.
The swap issue made me start to rethink:
If the final output must already pass strict automatic validation, does the input end really need to protect so much content?
Thinking about it another way:
Could we let GLM-5.2 see the real English original page as much as possible, protect only the very few machine structures that the model truly cannot touch, and then leave more safety responsibility to the unified validator?
This is the real starting point of this architecture experiment.
2. First, add a --raw-input experimental mode
I did not directly delete the already mature default protection flow; instead, I added a parameter specifically for experimentation:
--raw-input
Once enabled, the program still follows the original rules:
ReadCatalog
→ BuildSourceCatalog
→ HydrateCatalogSources
→ Extract complete production page based on page_id
In other words, the complete source content corresponding to a browser course page is still correctly extracted by the program.
Only the subsequent part changes.
Default mode:
Page.Source
↓
protectTranslation
↓
GLM-5.2
↓
restore
↓
ValidateCandidate
--raw-input:
Page.Source
↓
GLM-5.2
↓
ValidateCandidate
It no longer performs massive protected token replacement, nor does it perform post-translation restoration.
But one thing is very important:
--raw-inputdoes not bypass any output validation.
GLM-5.2’s output must still pass the existing:
present single-page parsing
directive validation
link target validation
in-link code validation
normal inline code validation
preformatted content validation
emphasis/font span validation
Section topology validation
directive placement validation
terminology rules
That is to say, the new experiment is not:
Trusting that the large language model will not make mistakes.
Rather:
Allowing the model to make mistakes, but the program must catch them.
3. flowcontrol/6: The first raw-input real request passes directly
The first real test page chosen was:
flowcontrol/6
Execute:
go run ./cmd/tour-i18n translate run \
--locale zh-CN \
--id flowcontrol/6 \
--dev \
--raw-input
The result passed directly:
status: ready
token_valid: true
present_valid: true
passed: true

flowcontrol/6 passes the unified automatic validation directlyThe terminal displays here:
attempts: 4
After checking the real audit logs later, I confirmed that this does not mean raw-input retried 4 times consecutively.
Attempts 1 through 3 were historical audits left by the previous default protected-token flow.
The real raw-input was only:
attempt 4
And it passed on the first try.
The actual token usage for this call was:
prompt: 1318
completion: 85
total: 1403
Compared to the previous default approach for the same page, which used over 2300 tokens in a single run, the input volume has decreased significantly.
However, I am not going to conclude from this single page that:
The translation quality of raw-input is definitely higher than the default approach.
A more accurate conclusion would be:
After reducing protected tokens, GLM-5.2 can directly see more real page content, while still passing the existing unified validation on the first try, at least for this page.
This proves that “massive tokenization” is not the only path to reliable translation.
If certain structures can actually be exposed directly to the model, and the validator can reliably check them, then there is indeed clear room for simplification on the input side.
4. Here we need to distinguish between “initial machine translation quality” and “final published quality”
raw-input has a very intuitive potential advantage:
The model sees more of the original context.
Therefore, the Chinese text the model generates initially might be more natural, and the language organization suffers from less placeholder interference.
But this does not mean:
raw-input will definitely translate better than the default protected-token approach in the end.
What the project ultimately delivers is not the candidate that GLM-5.2 spits out on the first try.
Even if we continue using the current default approach, after all course pages are translated, we can still perform unified human polishing and fine-tuning.
Therefore, the final published quality will likely be:
Default protected-token
+ Complete automatic validation
+ Unified pre-release polishing
And:
raw / minimal-protect
+ Complete automatic validation
+ Unified pre-release polishing
Reaching a similar level.
The former might even end up being better.
So what really needs to be compared in this experiment is not simply:
Which approach produces prettier Chinese on the first translation?
But the overall engineering cost:
Input processing complexity
Real context the model can see
Structural failure probability
Number of retries
Token consumption
Restore complexity
Whether the validator can reliably catch errors
Long-term maintenance cost
Final published quality
Translation quality is certainly very important, but it is not the only metric.
5. methods/24 quickly proved: completely raw also has obvious risks
If we only look at flowcontrol/6, it is easy to become overly optimistic:
Should we just send the original content directly for all pages?
So for the second test page, I chose one with a much more complex structure:
methods/24
This page contains:
.play methods/images.go
It also has multiple links, link targets, 9 inline codes, image.Rectangle within link labels, a static preformatted Go code block, and *Note* emphasis/font spans.
After the first raw-input run:
present_valid: false
Error reported:
methods/24: candidate present structure:
present parse:
methods.article:21: no match for zh-cn

methods/24 fails at the present parsing stageAfter further reviewing GLM-5.2’s complete response, the reason was very clear.
The original page was:
.play methods/images.go
The model generated on its own:
.play methods/images.go /zh-cn/methods/24
In other words, GLM-5.2 seemed to think it was “improving” this content by adding a path to it.
But for Go present, this is not natural language.
It is a machine directive.
So the parser continued parsing the appended content as a directive parameter, ultimately reporting:
no match for zh-cn
I ran another independent raw-input experiment.
This time GLM did not append:
/zh-cn/methods/24
But instead changed it to:
.play methods/images.go /src/methods/images.go
Two independent requests both actively modified .play, which is enough to show that:
Machine directives like
.playare not suitable for being left entirely to the model to generate freely.
6. GLM also actively “improves” link display formats
The raw-input experiment for methods/24 also revealed another very interesting issue.
The 4 link targets were always correctly preserved.
The existing 9 inline codes were not lost either.
The static Go code block was also kept correct line by line.
However, the model would actively adjust the format of the link display text.
For example, the original:
[[/pkg/image/#Image][Package image]]
GLM would generate:
[[/pkg/image/#Image][`image` package]]
The last link’s:
image/color package
Was also changed to:
`image/color` package
From the perspective of normal technical Chinese reading habits, this formatting is even quite reasonable.
But from the perspective of this project’s structural principles, the model arbitrarily added inline code spans that did not exist in the source page.
Therefore, the validator should still reject it.
This illustrates a fundamental risk of completely raw input:
The model does not just translate; it occasionally takes the initiative to “optimize” structures it thinks can be optimized.
For ordinary articles, this might be an advantage.
For a translation project that needs to maintain a structural correspondence with the upstream .article, this is sometimes a mistake.
7. So I began experimenting with a third path: --minimal-protect
At this point, both extremes had exposed problems.
The original approach:
Massive protected tokens
Has strong structural control, but the input and restoration logic is becoming increasingly complex.
Completely raw:
Original page
→ GLM
The program is obviously simpler, but machine structures might be actively rewritten by the model.
So I started testing a third path:
Only protect machine structures that have real evidence proving they are high-risk.
To this end, I added:
--minimal-protect
The first version did not re-protect inline code, links, emphasis, or static code blocks.
It only protected the complete:
.play methods/images.go
It would be replaced with a unique token, for example:
⟪GTI18N_d80f0d46_000001⟫
The rest of the page was still handed over to GLM-5.2 in an almost original state.
After the model returned, this token was restored to:
.play methods/images.go
The result was very clear:
The
.playissue completely disappeared.
GLM retained this token exactly as is, exactly once.
The restoration also precisely generated:
.play methods/images.go
It no longer appended:
/zh-cn/...
Or:
/src/...
This shows that the minimal protection direction is indeed effective.
At least for .play:
Leaving the model with no modification rights at all is more stable than relying on prompt instructions to “please do not modify”.
8. After only protecting .play, the remaining problems became clearer
Once .play was stably handled, I ran methods/24 again.
This time, the present directive parsing failure no longer occurred.
Instead, it showed:
link inline code at link index 1 count mismatch:
expected 0, actual 1

.play directive, the directive issue disappeared, but the model added inline code formatting to the link labels on its ownAfter checking the response, I confirmed that:
Package image
Was still changed to:
`image` package
And:
image/color package
Also again became:
`image/color` package
In other words, minimal protection did solve the first class of problems.
At the same time, it exposed the next class of real risks more clearly:
Machine directives
→ Should be directly protected
Normal link labels
→ Model still needs to translate them
→ But cannot change the span structure on its own
At this point, the easiest thing to think of is:
Then just continue to protect
imageandimage/color.
But after careful analysis, I found that this does not actually solve the problem.
Assume:
Package image
Becomes:
Package ⟪TOKEN⟫
GLM could very well still generate:
`⟪TOKEN⟫` package
The token itself was not changed.
After restoration, it is still:
`image` package
So:
Protecting a string itself is not equivalent to protecting the structural boundaries around that string.
If we continue expanding in this direction, it is easy to end up with more and more boundary tokens again.
9. Try again: let the validator’s failure feedback truly enter the next request
The project’s official translation flow originally supported limited full-page retries.
After the previous candidate failed validation, feedback could be generated and passed to the next full-page translation.
But in development mode:
--dev
Previously, each command execution only performed one attempt.
This meant that although the previous multiple experiments were executed consecutively, they actually belonged to different processes.
The later round did not truly receive the previous round’s validation failure.
To verify:
Without adding new protections, just telling the model exactly what went wrong—can it correct itself?
I also added:
--dev-attempts
For example:
--dev \
--dev-attempts 2
This way, two attempts could be executed consecutively within the same TranslationRunner.Run.
The feedback generated after the first failure would actually be added to the second user prompt.
For the case where inline code was added to link labels, the feedback was also made more specific:
The previous output added inline code formatting to the link display text that did not exist in the source page.
Do not add backticks or inline code markers to link labels that were originally plain text;
preserve the existing link targets and existing inline code structures from the source page.
Normal link display text can still be translated normally.
Please re-translate the complete page.
This did not hardcode:
methods/24
image
image/color
So it still serves as reusable general feedback.
10. After continuing the experiment, a new font span issue appeared
The final real experiment used:
go run -mod=readonly ./cmd/tour-i18n translate run \
--locale zh-CN \
--id methods/24 \
--dev \
--dev-attempts 2 \
--minimal-protect
Ultimately, attempt 7 still did not pass:
font span count mismatch:
expected 10, actual 9

At this point, the whole experiment had started to reveal a very representative path:
Completely raw
↓
.play is rewritten
Only protect .play
↓
Link labels actively get inline code added
Add precise feedback and continuous retries
↓
New font span structural issue appears again
This does not mean the minimal-protect direction is wrong.
On the contrary, it has already proven:
.play
Such a machine structure is very suitable for minimal protection.
And many other structures are actually more stable than I initially expected.
What really needs to be guarded against is:
If we immediately add a new protection rule every time we discover a new failure, we will likely end up right back at “massive tokenization”.
Just reimplemented all over again.
11. Therefore, I decided to stop further optimization here
Theoretically, we could still continue.
Seeing:
font span count mismatch
Then add emphasis/font span protection.
Then test .image.
Then test other directives.
Continue validating more preformatted content and complex links.
From a purely technical research perspective, these are all valuable.
But the project’s real goal is not:
To write a theoretically perfect translation protection framework.
The real goal remains:
Completing the A Tour of Go Simplified Chinese translation, and establishing a stable process that can be expanded to other languages later.
Moreover, continuing this kind of high-frequency architecture experiment presents a very practical issue:
Every time a phenomenon is discovered, Codex needs to read the repository, analyze the audit, modify the program, add tests, and then run GLM experiments.
Development resources are not infinite.
If we continue pursuing theoretical perfection, it will likely slow down the actual translation work instead.
So this time I decided:
To wrap up the experiment here for now, and not proactively expand minimal-protect further.
12. How should we evaluate the default approach vs. raw-input now?
After this round of experiments, I actually do not think we should simply say:
raw-input is better.
Or:
The default protected-token is better.
The two approaches solve different problems.
The default approach’s advantages are obvious:
More mature structural control
Already validated through multiple rounds of representative pages
Automatic validation system is already adapted
Can continue official production translation right now
The potential advantages of raw-input or minimal-protect are equally obvious:
Model sees more real context
Prompt input is shorter
Fewer protected tokens
Restore logic could be significantly simplified
Long-term program maintenance costs could be lower
As for translation quality, we also cannot just compare the first machine output.
Because the context is more complete, raw-input might directly produce a more natural first draft.
But after the current default approach completes all pages, unified human polishing, terminology adjustment, and detail fine-tuning can still be done.
Therefore, the final result could well be:
Default protected-token approach
+ Automatic validation
+ Later human polishing
With a final quality comparable to raw-input, or even surpassing it.
So what really interests me about this experiment is not just the translation quality.
More importantly:
Is there a way to make the input processing and restoration program simpler without sacrificing structural safety.
13. The long-term direction I am more optimistic about now
If we continue to simplify the current architecture in the future, I am now more inclined towards:
Complete original page first
↓
Only protect a few truly high-risk machine structures
↓
GLM-5.2 full-page translation
↓
Minimal restoration
↓
Strict unified validator
↓
Targeted retry feedback
This can also be summarized as:
Give the model as much real context as possible
Try not to give the model modification rights for machine control structures
Final safety is guaranteed by the unified validator
This is more lightweight than “tokenizing all dangerous content”.
And it is also more reliable than:
Completely raw
However, this is just a long-term direction left by this experiment.
It is not yet mature enough to directly replace the current official process.
14. Save the experiment results, but restore the official translation scene
Although this round of experiments has temporarily stopped, all code and real audits have been preserved.
Ultimately forming two commits:
62b1b1a feat: add translation input experiment and minimal protection capabilities
35259cf docs: record translation input architecture experiment conclusions
These saved:
--raw-input
--minimal-protect
--dev-attempts
Targeted retry feedback
Real request / response / validation audits
During the experiment, because --dev was used, the states of flowcontrol/6 and methods/24 temporarily changed.
After ending the experiment, I restored:
status.tsv
candidate
Back to their states before the official experiment.
Final check:
flowcontrol/6 ready
methods/24 ready
Working tree clean
The two commits have also been synced to:
origin/main

This way, this round of experiments was neither lost nor did it pollute the currently confirmed official translation results.
If we research the input architecture again later, we can continue directly based on these real attempts, rather than starting from scratch.
15. Next step: return to the actual course translation
After the experiment ends, the current official translation path remains unchanged for now:
Continue using the already mature protected-token flow.
Next, we return to the previously established plan:
Start automatic trial runs for normal pending pages.
No more proactively enumerating all possible structural risks for the remaining dozens of pages.
If most normal pages can pass directly, then we will just keep moving forward.
Only when new failures actually occur will we analyze:
Whether the model actually translated incorrectly
Or if it is a protection layer issue
Or if the validator still has a gap
And then only solve the problems that actually appear.
This is more in line with the project’s current stage than constantly predicting future edge cases before the official translation even begins.
Summary
The initial question of this round of experiments was actually very simple:
Before feeding it to GLM-5.2, is it really necessary to do so much token protection?
flowcontrol/6 proved:
Without large-scale protection, the complete original page can also directly pass the existing unified validation, and the input is more concise.
methods/24 again proved:
Completely raw is not enough to stably protect machine structures like
.play; the large language model will proactively “help” modify them.
And --minimal-protect further proved:
A small amount of machine structure protection supported by clear evidence is indeed effective.
But continuing the experiment led to new issues like link labels and font spans, which also reminded me:
If we continue to add a protection rule for every failure that appears, we might ultimately end up back with a complex token system.
Therefore, this did not lead to the conclusion that “the existing approach should be immediately overthrown”.
The current default approach is mature enough to continue completing the remaining pages.
Moreover, after all pages are translated, a unified round of human polishing and fine-tuning can be done to further improve the final translation quality.
The real value left by this round of experiments is that it made the possible future simplification direction clearer to me:
Prioritize the original page, reduce unnecessary tokens, protect only truly high-risk machine structures, and then use a strict validator and targeted retry feedback to hold the security boundary.
As for whether it is worth ultimately switching to this architecture, there is no need to rush a decision now.
Let’s just keep the actual translation project going.
After the first phase of Simplified Chinese is nearly complete, re-evaluating based on the real failure rate, token consumption, program complexity, and final human polishing results will likely be more valuable than continuing to pursue a theoretically optimal solution right now.
