로케일 감지기의 반환 값 문제

We’ve encountered two different issues on two different forums, where the content localization started to translate posts into their original language (and worse, weirdly messing up the content or adding “this post is already in English!”).

Digging into this, it turned out that the locale detector was not receiving a pure language code from the LLM.

Instead, it was wrapped in markdown ``` (copying the relevant parts from the log only for readability

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

or it had surrounding quotes, probably confused by the prompt which says Output: "en"

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

Changing the last line of the prompt to Your response must be a language code, and nothing else. Do not wrap your response in markdown. helped but I guess LanguageDetector.detect should clean up the answer a bit (maybe allowing only AZaz and - ?) before using it.

4개의 좋아요

thanks for reporting @nat will have a look

2개의 좋아요

@RGJ 이 건에 대한 PR이 열려 있지만, 어떤 LLM을 사용 중인지 공유해 주실 수 있을까요?

1개의 좋아요

해당 인스턴스는 이미 폐기했지만, 기억에 따르면 Ministral 3B였어요.

프롬프트를 업데이트하고 예시를 시스템 프롬프트에서 적절한 상호작용으로 옮기는 수정 사항을 이곳에 병합했습니다.

우리의 팀은 또한 다양한 LLM에서 신뢰성을 높이기 위해 평가(evals) 작업을 진행 중입니다.

2개의 좋아요

이 주제는 2일 후 자동으로 닫혔습니다. 더 이상 답변을 게시할 수 없습니다.