Cause
Per-Message Language Detection: In Legacy agent, the language is set for the entire conversation, while in Next Generation Agentforce (NGA), language detection occurs per message turn. If an end-user message is very short or contains alphanumeric codes, the language classification may sometimes fall below the internal pinning threshold.
Fallback to Permissive Locales: When confidence is below the threshold, the agent does not strictly generate response in the user's input language. Instead, it allows responses in any of the agent's configured allowed locales (e.g., default language + additional languages).
Hardcoded Strings in AgentScript: If the AgentScript or subagent instructions contain hardcoded phrases in the default language, the Large Language Model (LLM) will follow those prompt instructions and generate mixed language responses.
Resolution
To ensure consistent responses in the end user's input language during low-confidence turns, update your AgentScript and Subagent instructions:
Remove Hardcoded Default Language Phrases:
Search your AgentScript and subagent topics for hardcoded text in the default language and replace them with dynamic language guidelines.
Add Dynamic Mirroring Instructions:
Update the agent instructions with explicit rules for short or ambiguous inputs:
Rule 1: Reply in the language of the customer's latest message.
Rule 2: If the message contains short phrases or alphanumeric error codes like CBRCBK000034), reply Only in the End user's input language. Do not default to the agent's default language.
Rule 3: Translate all Knowledge Base (KB) articles or tool outputs into the detected language of the customer's latest message before returning the final response.
005459404

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.