How can AI agents be configured or instructed to respond in a user's preferred language?
Here's how you can enable responses to be returned in the user’s preferred language:
- You can specify the response language preference at the time of setting up your
workflow, or when adding individual LLM and agent nodes to the workflow.
- To set up the response language preference at the time of setting up your
workflow, do these steps:
- Go to AI Agent Studio.
- Select the Workflows
tab. - Select Edit
to modify the workflow. - Select Settings
and open the Chat
Experience tab. - Enable the Answer in user's language
option.
You can also update the language instructions in the respective prompt. If the language prompt isn't updated, the default language prompt is automatically applied. The default prompt is "
You must respond only in $context.$system.$responseLanguage. Do not use any other language."
- To set up the response language preference for individual nodes, do these
steps:
- Go to AI Agent Studio.
- Select Edit
to modify the workflow. - Select the nodes of type LLM or Agent, and enable the Answer in user's language option.
- To set up the response language preference at the time of setting up your
workflow, do these steps:
- You can specify to get the responses in your preferred language using natural language instructions when interacting with the agent.