בעיות בערך החזרה של מזהה שפה

סיכום מבוסס בינה מלאכותית

The discussion revolves around issues with the locale detector in content localization, where posts were incorrectly translated into their original language or corrupted due to improper handling of language codes. RGJ reported that the locale detector received a language code wrapped in markdown (e.g., ```), causing translation errors. sam acknowledged the report, and nat confirmed a PR was open, later merging a fix that updated the prompt and moved examples out of the system prompt to improve the LLM’s behavior. RGJ noted the issue was resolved on their end after decommissioning the affected instance. The fix is now live, enhancing localization reliability. nat shared the relevant PR link for reference.

נתקלנו בשתי בעיות שונות בשני פורומים שונים, בהן הלוקליזציה של התוכן החלה לתרגם פוסטים לשפת המקור שלהם.

בבדיקה מעמיקה, התברר שמזהה הלוקל לא קיבל קוד שפה טהור מה-LLM.

במקום זאת, הוא היה עטוף ב-markdown ``` (העתקת החלקים הרלוונטיים מהלוג רק לצורך קריאות

"delta":{"content":"```"}
"delta":{"content":"en```"},

או שהיו לו מרכאות מקיפות, כנראה מבולבל מההנחיה שאומרת Output: \"en\"

"delta":{"content":"\""}
"delta":{"content":"en\""}

שינוי השורה האחרונה של ההנחיה ל-Your response must be a language code, and nothing else. Do not wrap your response in markdown. עזר, אבל אני מניח ש-LanguageDetector.detect צריך לנקות את התשובה קצת (אולי לאפשר רק AZaz ו-?) לפני השימוש בה.

4 לייקים

תודה על הדיווח @nat יבחן זאת

2 לייקים

@RGJ we have a PR open for this, but can you share what LLM you’re using?

לייק 1

We’ve decommissioned that instance, but as far as I remember it was Ministral 3B.

I merged a fix here that included updating the prompt and moving examples away from the system prompt and into proper interaction.

https://github.com/discourse/discourse/pull/35763

Our team is also currently working on evals to improve reliability across various LLMs.

2 לייקים

This topic was automatically closed after 2 days. New replies are no longer allowed.