From 984aa044ab4428f345a6a364f05a998dd57563c6 Mon Sep 17 00:00:00 2001 From: ChihYu Yeh Date: Sun, 23 Feb 2025 00:13:53 +0800 Subject: [PATCH] update --- .../src/pipelines/generation/intent_classification.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wren-ai-service/src/pipelines/generation/intent_classification.py b/wren-ai-service/src/pipelines/generation/intent_classification.py index 01726e78d9..072c513a67 100644 --- a/wren-ai-service/src/pipelines/generation/intent_classification.py +++ b/wren-ai-service/src/pipelines/generation/intent_classification.py @@ -37,6 +37,8 @@ - MUST put the rephrased user's question in the rephrased_question output. - REASONING MUST be within 20 words. - If the rephrased user's question is vague and doesn't specify which table or property to analyze, classify it as MISLEADING_QUERY. +- The reasoning of the intent classification MUST use the same language as the Output Language from the user input. +- The rephrased user's question MUST use the same language as the Output Language from the user input. ### INTENT DEFINITIONS ### - TEXT_TO_SQL @@ -105,6 +107,7 @@ {% endif %} User's question: {{query}} Current Time: {{ current_time }} +Output Language: {{ language }} Let's think step by step """ @@ -224,6 +227,7 @@ def prompt( ) -> dict: return prompt_builder.run( query=query, + language=configuration.language, db_schemas=construct_db_schemas, query_history=history.sql if history else [], current_time=configuration.show_current_time(),