I think it's fairly known among "LLM practitioners" (or what to call it), that some languages are better at solving specific tasks. Generally if you find yourself in a domain dominated by research in language X, shifting your prompts to that language will give you better results.
Given that it was inside a 9-step text preprocessing pipeline, it would be surprising if the AI had that much autonomy.