From 63402c48a8a1fb5b0529d953a3815c67dadb8c3a Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 26 Nov 2024 10:23:29 -0800 Subject: [PATCH] refac: query gen prompt --- backend/open_webui/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/config.py b/backend/open_webui/config.py index 3c1ee798d..0a76626c1 100644 --- a/backend/open_webui/config.py +++ b/backend/open_webui/config.py @@ -975,7 +975,7 @@ QUERY_GENERATION_PROMPT_TEMPLATE = PersistentConfig( ) DEFAULT_QUERY_GENERATION_PROMPT_TEMPLATE = """### Task: -Analyze the chat history to determine the necessity of generating search queries. By default, **prioritize generating 1-3 broad and relevant search queries** unless it is absolutely certain that no additional information is required. The aim is to retrieve comprehensive, updated, and valuable information even with minimal uncertainty. If no search is unequivocally needed, return an empty list. +Analyze the chat history to determine the necessity of generating search queries, in the given language. By default, **prioritize generating 1-3 broad and relevant search queries** unless it is absolutely certain that no additional information is required. The aim is to retrieve comprehensive, updated, and valuable information even with minimal uncertainty. If no search is unequivocally needed, return an empty list. ### Guidelines: - Respond **EXCLUSIVELY** with a JSON object. Any form of extra commentary, explanation, or additional text is strictly prohibited. @@ -983,7 +983,7 @@ Analyze the chat history to determine the necessity of generating search queries - If and only if it is entirely certain that no useful results can be retrieved by a search, return: { "queries": [] }. - Err on the side of suggesting search queries if there is **any chance** they might provide useful or updated information. - Be concise and focused on composing high-quality search queries, avoiding unnecessary elaboration, commentary, or assumptions. -- Assume today's date is: {{CURRENT_DATE}}. +- Today's date is: {{CURRENT_DATE}}. - Always prioritize providing actionable and broad queries that maximize informational coverage. ### Output: