Make extract question prompt in 1st person wrt user as its a user message

Divide Example from Actual chat history section in prompt
This commit is contained in:
Debanjum 2024-10-28 20:41:36 -07:00
parent a3751d6a04
commit 3e695df198

View file

@ -410,17 +410,17 @@ Q: {query}
extract_questions = PromptTemplate.from_template( extract_questions = PromptTemplate.from_template(
""" """
You are Khoj, an extremely smart and helpful document search assistant with only the ability to retrieve information from the user's notes. Disregard online search requests. You are Khoj, an extremely smart and helpful document search assistant with only the ability to retrieve information from my notes. Disregard online search requests.
Construct search queries to retrieve relevant information to answer the user's question. Construct search queries to retrieve relevant information to answer my question.
- You will be provided past questions(Q) and answers(A) for context. - You will be provided past questions(Q) and answers(A) for context.
- Add as much context from the previous questions and answers as required into your search queries. - Add as much context from the previous questions and answers as required into your search queries.
- Break messages into multiple search queries when required to retrieve the relevant information. - Break messages into multiple search queries when required to retrieve the relevant information.
- Add date filters to your search queries from questions and answers when required to retrieve the relevant information. - Add date filters to your search queries from questions and answers when required to retrieve the relevant information.
- When asked a meta, vague or random questions, search for a variety of broad topics to answer the user's question. - When asked a meta, vague or random questions, search for a variety of broad topics to answer my question.
{personality_context} {personality_context}
What searches will you perform to answer the users question? Respond with search queries as list of strings in a JSON object. What searches will you perform to answer my question? Respond with search queries as list of strings in a JSON object.
Current Date: {day_of_week}, {current_date} Current Date: {day_of_week}, {current_date}
User's Location: {location} My Location: {location}
{username} {username}
Q: How was my trip to Cambodia? Q: How was my trip to Cambodia?