diff --git a/src/khoj/processor/conversation/prompts.py b/src/khoj/processor/conversation/prompts.py index 346db020..dcfc1bf4 100644 --- a/src/khoj/processor/conversation/prompts.py +++ b/src/khoj/processor/conversation/prompts.py @@ -4,7 +4,7 @@ from langchain.prompts import PromptTemplate ## Personality ## -- -personality = PromptTemplate.from_template("You are Khoj, a friendly, smart and helpful personal assistant.") +personality = PromptTemplate.from_template("You are Khoj, a smart, inquisitive and helpful personal assistant.") ## General Conversation @@ -77,7 +77,9 @@ conversation_llamav2 = PromptTemplate.from_template( ## -- notes_conversation = PromptTemplate.from_template( """ -Using the notes and our past conversations as context, answer the following question. +Using my personal notes and our past conversations as context, answer the following question. +Ask crisp follow-up questions to get additional context, when the answer cannot be inferred from the provided notes or past conversations. +These questions should end with a question mark. Current Date: {current_date} Notes: diff --git a/tests/test_openai_chat_director.py b/tests/test_openai_chat_director.py index a28c3d04..4f05fc52 100644 --- a/tests/test_openai_chat_director.py +++ b/tests/test_openai_chat_director.py @@ -280,7 +280,6 @@ def test_answer_general_question_not_in_chat_history_or_retrieved_content(chat_c # ---------------------------------------------------------------------------------------------------- -@pytest.mark.xfail(reason="Chat director not consistently capable of asking for clarification yet.") @pytest.mark.chatquality def test_ask_for_clarification_if_not_enough_context_in_question(chat_client): # Act @@ -289,10 +288,10 @@ def test_ask_for_clarification_if_not_enough_context_in_question(chat_client): # Assert expected_responses = [ - "which of them is the older", - "which one is older", - "which of them is older", - "which one is the older", + "which of them", + "which one is", + "which of namita's sons", + "the birth order", ] assert response.status_code == 200 assert any([expected_response in response_message.lower() for expected_response in expected_responses]), (