はじめに
watsonxのサービスがリリースされて、様々な活用方法が検討される中、私は専門用語が含まれる英文の日本語翻訳ができないかを少しチャレンジしています。
翻訳サービス使えば良いのでは、となるのですが、製品独自の表現は出来れば意図した訳し方をしてほしいですし、せっかく自社の生成AIサービスが出たので何とかできないかを試行錯誤しているところです。watasonxの担当というわけでもないので、思いついた限りをいろいろやっているところです。
具体的なチャレンジ内容
IBM Cloudを利用していると、その利用に関わるメンテナンス通知や、アナウンス情報が必要に応じて送られてくるのですが、英語の文面でやってきます。これをGoogle翻訳等を使って翻訳しても良いのですが、システマチックに良い感じの日本語でその内容を受け取れたらと考えてます。
利用環境
生成AIサービス: watsonx.ai
利用モデル: meta-llama/llama-2-70b-chat
試した文章
この文章は、IBM Cloudから送られてきた通知そのままではなく、原文をwatsonx.aiである程度要約した文書になります。とりあえずこの翻訳をやってみましょう。
1. Review the updated IBM Cloud Service Description, specifically the changes mentioned in the notification.
2. Familiarize yourself with the new Service Level Agreement and how it may impact your use of IBM Cloud services.
3. Check if your contract is impacted by the updated extended support for Tier 1 services term and plan accordingly.
4. If you have any questions or concerns, reach out to IBM Cloud support or your IBM representative.
5. If you are an existing customer, you do not need to take any action as the updated terms will come into effect 30 days from the date of the notification. For new contracts, the updated terms are effective immediately.
なお、記事執筆時点でこの文章をGoogle翻訳で日本語にすると以下のようになります。
すでに良い感じですが、これと同等かこれ以上の翻訳が出るのを目指したいですね。
1. 更新された IBM Cloud サービスの説明、特に通知に記載されている変更点を確認します。
2. 新しいサービス・レベル・アグリーメントと、それが IBM Cloud サービスの使用にどのような影響を与えるかをよく理解してください。
3. 契約が Tier 1 サービス期間の更新された延長サポートの影響を受けるかどうかを確認し、それに応じて計画を立てます。
4. 質問や懸念がある場合は、IBM Cloud サポートまたは IBM 担当者にお問い合わせください。
5. 既存の顧客の場合、更新された規約は通知日から 30 日後に発効するため、何もする必要はありません。 新規契約の場合、更新された条件は直ちに有効になります。
何も工夫しない場合
watsonx.aiのプロンプトに以下のように投入しました。
Please translate the following Original text into Japanese.
Original text:
1. Review the updated IBM Cloud Service Description, specifically the changes mentioned in the notification.
2. Familiarize yourself with the new Service Level Agreement and how it may impact your use of IBM Cloud services.
3. Check if your contract is impacted by the updated extended support for Tier 1 services term and plan accordingly.
4. If you have any questions or concerns, reach out to IBM Cloud support or your IBM representative.
5. If you are an existing customer, you do not need to take any action as the updated terms will come into effect 30 days from the date of the notification. For new contracts, the updated terms are effective immediately.
Translated text:
出力された翻訳文書は以下の通りです。
1. IBM Cloud サービス説明の更新をレビューし、通知に記載された変更について理解してください。
2. 新しいサービス レベル アグリーメントについて自分のIBM Cloud サービスの使用方法に与える影響について Familiarize yourself with it.
3. 更新された Tier 1 サービスの拡張サポート期間に関する契約が影響を受けるかどうかを確認し、必要に応じて計画を策定してください。
4. また、IBM Cloud サポートまたはIBM 代理店に、あなたが持つ任何の質問や懸念についてお問い合わせください。
5. 既存のお客様は、通知日から30日以内に更新された条件が有効になるため、特別なアクションは必要ありません。 新しい契約の場合、更新された条件はすぐに有効になります。
伝わらないわけではないですが、一部日本語化まったくできていない(familialize yourself withがそのまま)ですし、一部専門用語的に翻訳してほしい部分が一般語になっていますね。変な日本語も見受けられます。あなたが持つ任何の質問
って何よ。。。
工夫1:辞書作成
この単語やフレーズはこういう風に翻訳してほしいなと伝えてみることにしました。
投入したプロンプトは以下です。
例えば Service Description
は、IBM Cloudのサービス提供について定義しているドキュメントで、和訳する場合の名称は サービス記述
になるので、そのように翻訳するように指示しています。
This is the English-Japanese dictionary that is used first when performing translations.
# Service Description : サービス記述
# Service Level Agreement : サービス・レベル・アグリーメント
# IBM representative : IBM担当者
# IBM Cloud : IBM Cloud
# If you have any questions : ご質問がある場合は
# Familiarize yourself with : よく理解してください
If dictionary information is set, give priority to the dictionary information.
Please translate the following Original text into Japanese.
Original text:
1. Review the updated IBM Cloud Service Description, specifically the changes mentioned in the notification.
2. Familiarize yourself with the new Service Level Agreement and how it may impact your use of IBM Cloud services.
3. Check if your contract is impacted by the updated extended support for Tier 1 services term and plan accordingly.
4. If you have any questions or concerns, reach out to IBM Cloud support or your IBM representative.
5. If you are an existing customer, you do not need to take any action as the updated terms will come into effect 30 days from the date of the notification. For new contracts, the updated terms are effective immediately.
Translated text:
生成された翻訳文書は以下の通りです。
1. 更新された IBM Cloud サービス記述をレビューし、通知に記載された変更に注目してください。
2. 新しいサービス・レベル・アグリーメントについて、IBM Cloud サービスの使用にどのような影響があるかを理解してください。
3. 更新された Tier 1 サービスの延長サポート期間に関する契約が影響を受けるかどうかを確認し、必要に応じて計画を策定してください。
4. ご質問や懸念がある場合は、IBM Cloud サポートまたはIBM担当者にお問い合わせください。
5. 既存のお客様は、通知日から 30 日以内に更新された条件が有効になります。新規契約の場合、更新された条件は即時有効です。
急に良い感じになりましたね!
ただ、この辞書の宣言は、宣言しても必ずそれが利用されるというわけではありません。あまり一般的に使われない用語であれば採用されるケースが多いですが、うまく採用されないケースも発生します。
例えば、次のプロンプトは、先ほどの辞書から # IBM representative : IBM担当者
を消したものです。
なぜかわからないですが、途端に familialize yourself with
が翻訳できなくなっています。
辞書の項目の有無によって翻訳される、されないが分かれるのはちょっと困りますね。
This is the English-Japanese dictionary that is used first when performing translations.
# Service Description : サービス記述
# Service Level Agreement : サービス・レベル・アグリーメント
# IBM Cloud : IBM Cloud
# If you have any questions : ご質問がある場合は
# Familiarize yourself with : よく理解してください
If dictionary information is set, give priority to the dictionary information.
Please translate the following Original text into Japanese.
Original text:
1. Review the updated IBM Cloud Service Description, specifically the changes mentioned in the notification.
2. Familiarize yourself with the new Service Level Agreement and how it may impact your use of IBM Cloud services.
3. Check if your contract is impacted by the updated extended support for Tier 1 services term and plan accordingly.
4. If you have any questions or concerns, reach out to IBM Cloud support or your IBM representative.
5. If you are an existing customer, you do not need to take any action as the updated terms will come into effect 30 days from the date of the notification. For new contracts, the updated terms are effective immediately.
Translated text:
1. IBM Cloud サービス記述の更新版を確認し、通知に記載された変更について理解してください。
2. 新しいサービス・レベル・アグリーメントについて Familiarize yourself with し、IBM Cloud サービスの使用にどのような影響があるかについて理解してください。
3. 更新された Tier 1 サービスの拡張サポート期間に関する契約が影響を受けるかどうかを確認し、必要に応じて計画を策定してください。
4. ご質問や懸念がある場合は、IBM Cloud サポートまたはIBM 代理店にお問い合わせください。
5. 既存のお客様は、通知日から 30 日以内に更新された条件が有効になります。 新規契約の場合、更新された条件はすぐに有効になります。
あと、この辞書の追加自体はプログラムで特定の用語が含まれていたら追加するようにプロンプトを自動生成するようにしていますが、引っかかる用語が多くなると辞書部分の記載が増えていって、生成AIに投入するInputのTokenがどんどん増加してしまいます。そこまで費用がシビアではないですが、できれば投入するInputもあまり多くならないようにしたいところです。
工夫2:逆ルー大柴対応
先ほどまでの工夫では、特定の用語が本文に含まれる場合に辞書を記載するようにしました。
逆ルー大柴対応では、本文の英語を日本語に置き換える
ようにしてみました。
英語の中に日本語がちらほら出てくる、ルー大柴の逆ですね。
Translate the following Original text into Japanese. Leave Japanese words in the document unchanged.
Original text:
1. Review the updated IBM Cloud サービス記述, specifically the changes mentioned in the notification.
2. よく理解してください the new サービス・レベル・アグリーメント and how it may impact your use of IBM Cloud services.
3. Check if your contract is impacted by the updated extended support for Tier 1 services term and plan accordingly.
4. ご質問がある場合は or concerns, reach out to IBM Cloud support or your IBM担当者.
5. If you are an existing customers, you do not need to take any action as the updated terms will come into effect 30 days from the date of the notification. For new contracts, the updated terms are effective immediately.
Translated text:
生成された翻訳文が以下です。
1. IBM Cloud サービス記述の更新をレビューしてください、特に通知に記載された変更について。
2. 新しいサービス・レベル・アグリーメントをよく理解してください、それがIBM Cloud サービスの使用にどのような影響を与えるか。
3. Tier 1 サービスの更新された拡張サポート期間に関する契約が影響を受けるかどうかを確認し、それに応じて計画を策定してください。
4. ご質問がある場合は、IBM Cloud サポートまたはIBM担当者にお問い合わせください。
5. 既存のお客様は、通知の日から30日以内に更新された条件が発効するため、特に行動を起こす必要はありません。 新しい契約については、更新された条件が即時有効です。
倒置法文章が出てきているのをどうするべきか悩みますが、こう訳してほしい!という点については忠実に従ってくれているように思います。
この方法だと、InputのTokenはあまり増えずに対応できますし、特定の用語があれば置き換える、というのはプログラムで簡単に行えるので、これはこれで一つの対応方法なのかもしれません。
さいごに
いかがでしたでしょうか?専門用語を意図したように翻訳するために翻訳サービスではなく生成AI(watsonx.ai)にお願いする時に、こういった対応も1つの解決策になればと思い投稿させて頂きました。