mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-05 13:21:18 +00:00
Improve doc search actor performance on vague, random or meta questions
- Issue Previously the doc search actor wouldn't extract good search queries to run on user's documents for broad, vague questions. - Fix The updated extract questions prompt shows and tells the doc search actor on how to deal with such questions The doc search actor's temperature was also increased to support more creative/random questions. The previous temp of 0 was meant to encourage structured json output. But now with json mode, a low temp is not necessary to get json output
This commit is contained in:
@@ -24,7 +24,7 @@ def extract_questions(
|
||||
conversation_log={},
|
||||
api_key=None,
|
||||
api_base_url=None,
|
||||
temperature=0,
|
||||
temperature=0.7,
|
||||
max_tokens=100,
|
||||
location_data: LocationData = None,
|
||||
user: KhojUser = None,
|
||||
@@ -52,6 +52,7 @@ def extract_questions(
|
||||
prompt = prompts.extract_questions.format(
|
||||
current_date=today.strftime("%Y-%m-%d"),
|
||||
day_of_week=today.strftime("%A"),
|
||||
current_month=today.strftime("%Y-%m"),
|
||||
last_new_year=last_new_year.strftime("%Y"),
|
||||
last_new_year_date=last_new_year.strftime("%Y-%m-%d"),
|
||||
current_new_year_date=current_new_year.strftime("%Y-%m-%d"),
|
||||
|
||||
Reference in New Issue
Block a user