From bd510deaf6a9e17c4dea7123509efd39b24a3b88 Mon Sep 17 00:00:00 2001 From: prestonrasmussen Date: Wed, 3 Dec 2025 11:40:02 -0500 Subject: [PATCH] foreign language fix --- 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__)