From 1a6ce1d5d93f00b8f66461d4efe500f8764ea167 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 7 Sep 2024 05:41:55 +0100 Subject: [PATCH] refac: default search generation prompt --- backend/open_webui/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 872adee2d..9e6aa6fab 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -1452,7 +1452,7 @@ async def generate_search_query(form_data: dict, user=Depends(get_verified_user) if app.state.config.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE != "": template = app.state.config.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE else: - template = """You are tasked with assessing the need for a web search based on the current question and the context provided by the previous interactions. If the question requires a web search, generate an appropriate query for a Google search and respond with only the query. If the question can be answered without a web search or does not require further information, return an empty string. Today's date is {{CURRENT_DATE}}. + template = """Assess the need for a web search based on the current question and prior interactions, but lean towards suggesting a Google search query if uncertain. Generate a Google search query even when the answer might be straightforward, as additional information may enhance comprehension or provide updated data. If absolutely certain that no further information is required, return an empty string. Default to a search query if unsure or in doubt. Today's date is {{CURRENT_DATE}}. Interaction History: {{MESSAGES:END:6}}