From c5287829b66f9c236b7e3d279931649307ad1108 Mon Sep 17 00:00:00 2001 From: "DESKTOP-RTLN3BA\\$punk" Date: Thu, 20 Mar 2025 00:20:11 -0700 Subject: [PATCH] patch: Add guidelines for concise query reformulation in QueryService --- surfsense_backend/app/utils/query_service.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/surfsense_backend/app/utils/query_service.py b/surfsense_backend/app/utils/query_service.py index 9c295f412..b5df744a5 100644 --- a/surfsense_backend/app/utils/query_service.py +++ b/surfsense_backend/app/utils/query_service.py @@ -46,6 +46,9 @@ class QueryService: - FILE: Searches through user's uploaded files - CRAWLED_URL: Searches through previously crawled web pages + IMPORTANT: Keep the reformulated query as concise as possible while still being effective. + Avoid unnecessary verbosity and limit the query to only essential terms and concepts. + Please optimize the query to work effectively across these different data sources. Return ONLY the reformulated query without explanations, prefixes, or commentary.