Skip to content

Commit

Permalink
add format for tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
gargimaheshwari committed Jun 20, 2024
1 parent b22fbcd commit acae840
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lyzr/base/prompt_texts.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"system": {
"context": "You are the world's best to-do creator and assigner. All the to-dos are executable in 60 minutes or less.\nYou can understand any recommendation or set of recommendations and break it down into a list of to-do's that the user could do in 60 minutes or less.\nThese to-dos will help the user execute the larger recommendations.\n\n",
"external_context": "{context}",
"task": "Generate a list of to-dos that are not complex and don't require multiple tasks to be executed at once.\nThey should be sequential and the user should be able to complete the to-dos one at a time.\n\nGenerate to-dos that are specific and quantifiable, ensuring that each task mentions a clear numeric target.\nEach task should be feasible to complete within a 2 to 3-hour timeframe.\nFor example, instead of saying 'Speak to customers', the task should be 'Speak to 10 customers'.\nLikewise, instead of 'Create a list of documents', it should specify 'Create a list of 30 documents'.\n\nEach to-do should be between 15 and 25 words. And generate no more than {n_tasks} to-dos. \n\nThe to-dos should always start with one of the below:\nCreate a list,\nWrite down, \nSpeak to,\nSetup 30 minutes to dive deep and analyze,\nPlan to,\nDo,\nReview,\nDraft,\nComplete,\nBegin,\nDiscuss,\nSchedule,\nConfirm,\nReach out to,\nTest,\nAttend,\nAllocate time for",
"task": "Generate a list of to-dos that are not complex and don't require multiple tasks to be executed at once.\nThey should be sequential and the user should be able to complete the to-dos one at a time.\n\nGenerate to-dos that are specific and quantifiable, ensuring that each task mentions a clear numeric target.\nEach task should be feasible to complete within a 2 to 3-hour timeframe.\nFor example, instead of saying 'Speak to customers', the task should be 'Speak to 10 customers'.\nLikewise, instead of 'Create a list of documents', it should specify 'Create a list of 30 documents'.\n\n",
"closing": "Use the following format:\n{tasks_format}\n\nEach to-do should be between 15 and 25 words. And generate no more than {n_tasks} to-dos. \n\nThe to-dos should always start with one of the below:\nCreate a list,\nWrite down, \nSpeak to,\nSetup 30 minutes to dive deep and analyze,\nPlan to,\nDo,\nReview,\nDraft,\nComplete,\nBegin,\nDiscuss,\nSchedule,\nConfirm,\nReach out to,\nTest,\nAttend,\nAllocate time for",
},
"user": {
"inputs": "User Query: {user_input}\n\nAnalysis results & insights: {insights}\n\nRecommendations: {recommendations}"
Expand Down
3 changes: 2 additions & 1 deletion lyzr/data_analyzr/analyzr.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,11 @@ def tasks(
"""
if tasks_context is None:
tasks_context = ""
tasks_format = "1. Task 1\n2. Task 2\n...\n"
self.tasks_output = self.generator_llm.run(
messages=[
LyzrPromptFactory(name="tasks", prompt_type="system").get_message(
context=tasks_context, n_tasks=n_tasks
context=tasks_context, tasks_format=tasks_format, n_tasks=n_tasks
),
LyzrPromptFactory(name="tasks", prompt_type="user").get_message(
user_input=user_input,
Expand Down

0 comments on commit acae840

Please sign in to comment.