Skip to content

initial prompt and translate function for l10n #6700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 12, 2025

Conversation

escattone
Copy link
Contributor

@escattone escattone commented Jun 2, 2025

mozilla/sumo#2355

Notes

  • The gemini-2.5-pro-preview-05-06 model provides consistently excellent results given my "kitchen-sink" test case, while gemini-2.5-flash-preview-04-17 frequently makes mistakes, which makes sense given the increased logical complexity of the task relative to the spam and topic classification tasks.
  • It might be worth limiting the use of the gemini-2.5-pro-preview-05-06 model to the KB article's content only, and use the cheaper/faster gemini-2.5-flash-preview-04-17 model for the much simpler task of translating the keywords, summary, and title. I haven't done that in this PR.

@escattone escattone force-pushed the initial-l10n branch 6 times, most recently from f66915e to 6a23d5f Compare June 5, 2025 23:19
@escattone escattone marked this pull request as ready for review June 5, 2025 23:19
@escattone escattone requested a review from akatsoulas June 5, 2025 23:19
@escattone escattone force-pushed the initial-l10n branch 6 times, most recently from 8e06d96 to 3f6a86e Compare June 10, 2025 21:15
Copy link
Collaborator

@akatsoulas akatsoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+wc

I think this is a great start. We can include this and optimize it as we go. Nice work

"""
llm = get_llm("gemini-2.5-pro-preview-05-06")

translation_chain = translation_prompt | llm | translation_parser
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for this PR, but I am wondering if there's a way to extract this logic which is similar with the classifier to a method to make it more DRY. Maybe it's worth capturing an issue about it

@escattone escattone merged commit 15f83e2 into mozilla:main Jun 12, 2025
2 checks passed
@escattone escattone deleted the initial-l10n branch June 12, 2025 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants