From 2d262cf22d3e14405cf195132c53194798dabad8 Mon Sep 17 00:00:00 2001 From: Preston Rasmussen <109292228+prasmussen15@users.noreply.github.com> Date: Wed, 3 Dec 2025 08:47:12 -0800 Subject: [PATCH] foreign language fix (#1090) --- graphiti_core/llm_client/client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/graphiti_core/llm_client/client.py b/graphiti_core/llm_client/client.py index 0f51dc04..324a82ee 100644 --- a/graphiti_core/llm_client/client.py +++ b/graphiti_core/llm_client/client.py @@ -48,7 +48,11 @@ def get_extraction_language_instruction(group_id: str | None = None) -> str: Returns: str: Language instruction to append to system messages """ - return '\n\nAny extracted information should be returned in the same language as it was written in.' + return ( + '\n\nAny extracted information should be returned in the same language as it was written in. ' + 'Only output non-English text when the user has written full sentences or phrases in that non-English language. ' + 'Otherwise, output English.' + ) logger = logging.getLogger(__name__)