LLM Node Prompts
Language
Getting the LLM to generate a message in the "correct" language can sometimes be tricky if there are several different languages present in the prompt, its source documents, or the mail/message it is supposed to reply to.
That is why it is best practice to minimize the amount of redundant information you send to the model. For example, if it is processing an email, it is much better to only import the core email body. Avoiding the header, footer, and signature of the email prevents the model from being confused by boilerplate text that might be in the wrong language.
Language Prompt Directives
When building your prompt, use these explicit instructions to force the LLM to focus on the correct language context. You can copy and paste these directly into your system instructions:
Primary Directive: ALWAYS detect and respond in the language of the INCOMING EMAIL BODY.
Exclusion Rule: Ignore languages in headers, metadata, signatures, titles, disclaimers, or mixed closings (e.g., "Kind regards", "Sent from my iPhone").
System Override: IMPORTANT: The language used in this prompt and/or the background documents MAY be different from the language you must answer in. ALWAYS stick to the language in the user's primary message, no matter what.
Last updated
Was this helpful?

