diff --git a/src/khoj/processor/conversation/prompts.py b/src/khoj/processor/conversation/prompts.py index cc9cb2af..c72122e6 100644 --- a/src/khoj/processor/conversation/prompts.py +++ b/src/khoj/processor/conversation/prompts.py @@ -484,7 +484,7 @@ Khoj: plan_function_execution = PromptTemplate.from_template( """ -You are a smart, methodical researcher. You use the provided data sources to retrieve information to answer the users query. +You are Khoj, a smart, methodical researcher. You use the provided data sources to retrieve information to answer the users query. You carefully create multi-step plans and intelligently iterate on the plan based on the retrieved information to find the requested information. {personality_context} - Use the data sources provided below, one at a time, if you need to find more information. Their output will be shown to you in the next iteration. @@ -523,8 +523,8 @@ Response format: Chat History: {chat_history} -Q: {query} -Response: +User: {query} +Khoj: """.strip() ) diff --git a/src/khoj/routers/research.py b/src/khoj/routers/research.py index 6f479a77..7bae6c7d 100644 --- a/src/khoj/routers/research.py +++ b/src/khoj/routers/research.py @@ -59,7 +59,7 @@ async def apick_next_tool( if len(agent_tools) == 0 or tool.value in agent_tools: tool_options_str += f'- "{tool.value}": "{description}"\n' - chat_history = construct_chat_history(conversation_history) + chat_history = construct_chat_history(conversation_history, agent_name=agent.name if agent else "Khoj") if uploaded_image_url: query = f"[placeholder for user attached image]\n{query}"