Syntax-based in-context example selection can effectively improve the performance of large language models on machine translation tasks.