📝 Update prompts and German translation#14015
Conversation
So that the LLM really does not do that (it sometimes did)
More to come soon
index.md is already up to date, no changes
The previous commit message should have been: Update advanced/additional-responses.md Time to make a break XD
The previous commit title should again have been: Update advanced/advanced-dependencies.md
Exchange rule 4 and 5 and then exclude additional abbr's (abbr's without an english equivalent) from the list of abbr's which shall always be updated, as the LLM has nothing to diff against in this case. There were cases where it removed good information, which I had to undo, see e.g. the changes in `tutorial\query-param-models.md` in the two previous commits.
* "Die API-App abliefern" sounds funny, allow "Die API-Anwendung abliefern" * "Leistung" instead of "Performanz" is usually smoother, we just dont want "Performance" (which is an artistic act) instead of "Performanz".
It should replace «"car"» with «„Auto“» but leave «`"car"`» as is (and not convert it to e.g. «„car“»). After this change it seems to finally have grasped that rule, at least according to my tests in a few documents, where it previously seemingly randomly did this wrong.
These changes are now handled in fixes-in-english-docs (fastapi#14048).
Let's handle these changes in another PR. Except the modifications in the prompt, this translate.py is now in sync with the translate.py in update-translations-prompt (fastapi#13968).
This comment was marked as outdated.
This comment was marked as outdated.
|
Okay, that final retranslation went smooth. There were two issues which I addressed doing a few changes in the prompt and a few more which I manually edited. Most were fixes by the LLM. I removed the parts which will be done in other PRs. If there are no other issues, I give my OK for merging. 🚀 Can someone take a look at the failed test? It seems to have a problem with the @YuriiMotov, can you take a look at the final changes in the general prompt? @tiangolo, shall we apply the changes in the German prompt here or in #13931? |
|
Thanks! I applied latest changes to translation script in #13968 As for labels - don't worry about this, we will remove Reminder: don't forget to revert changes to |
I needed it to run test Russian translations.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Thanks Yurii, good catch. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
tiangolo
left a comment
There was a problem hiding this comment.
Amazing, fantastic job @nilslindemann, thanks a lot! 🙌
And also thanks @YuriiMotov for all the help with this. 🍰
|
Awesome, always nice to have such a big PR done, I hope it was not too much work to review, Tiangolo. Also thanks Yurii. |
Setting it to draft temporarily to run one final language translation on the current state, to test if the prompts are good.
What I have done 💪
I have let the AI retranslate all the German documents, at least twice per document, and at least once with GPT 5. In the first run I mostly used GPT 4o and a few times GPT 5, with prompt modifications in-between, learning from GPTs output (and vice versa I guess). In the second run, which was a batch run without prompt modifications in-between, I used GPT 5 (Plot twist, it does the job better [1]). I diffed both against the English document and the previous translation, sometimes doing global changes in the German docs on the way. I did not look at parts which were white in the previous-translation ↔ new translation diff (= unchanged parts), as I translated most of them a few months ago, reviewing them back then. But I used white parts in the English document ↔ new translation diff, to see if critical changes in the previous-translation ↔ new translation diff, like changes in code includes, are good and bring things in sync.
What the PR changes 🔨
This PR applies all changes of #13993 (merged), #13968, #13931, #13929 (closed, will be done here), #13930 (closed, will be done here) before it adds changes on top. I later apply @svlandeg's suggestions in the permalink PR (#13993) and manually fix outdated permalinks. The second batch run showed that the permalinks are in sync. The PR makes:
translate.pydocs/de/llm-prompt.md, which is the German LLM prompt, which gets appended to the general prompt in thetranslate.py.docs/de/docs, to bring them in sync with the English docs (adding a fewabbrs on top)Outdated
It also adds/fixes some things in the code oftranslate.pya few changes to English documents under.docs/en/docs, mostly fixesI have added a filedocs/en/docs/_llm-test.md, which can be used to test the prompt. The German translation of it is also includedHow to review 💪
The Commits start clean, but sometimes get a bit messy towards the end, especially those made late at night 😅. Sorry about that. I suggest to not go through the PR commit-by-commit, but all-in-one, by using the Files changed tab, because some files are changed more than once in more than one commit, sometimes overwriting changes of previous commits. I suggest directly comparing those German translations which have many changes with the English document.
The result 😲
After this PR, all
111112 (I have added a test document) translatable English documents have their in-sync German translation.Credits 🤝
Thanks to @tiangolo, @YuriiMotov, @alejsdev and everyone else for their friendly support.
Footnote 📓
[1] GPT 5's changes are approximately 90% fixes and good changes, approximately 5% are unnecessary changes and approximately 5% are changes which have to be manually edited or reverted. GPT 4 does more unnecessary changes, resulting in, on average, twice as big diffs. GPT 5 understands complex prompt instructions better than GPT 4 and applies them more precise.