From b9e52bc815cf037d1e031e0102eff220d1f20fd8 Mon Sep 17 00:00:00 2001 From: Hugo Saporetti Junior Date: Wed, 4 Sep 2024 13:55:04 -0300 Subject: [PATCH] Put back task guidelines on task-slitter prompt --- dependencies.hspd | 2 +- .../askai/resources/prompts/task-splitter.txt | 41 ++++++++++++++++--- src/main/requirements.txt | 2 +- 3 files changed, 38 insertions(+), 7 deletions(-) diff --git a/dependencies.hspd b/dependencies.hspd index 5592b479..aa24380f 100644 --- a/dependencies.hspd +++ b/dependencies.hspd @@ -20,7 +20,6 @@ package: langchain-openai, version: 0.1.23, mode: ge package: langchain-community, version: 0.2.14, mode: ge package: langchain-google-community, version: 1.0.8, mode: ge package: langchainhub, version: 0.1.20, mode: ge -package: faiss-cpu, version: 1.8.0.post1, mode: ge package: openai-whisper, version: 20231117, mode: ge package: openai, version: 1.42.0, mode: ge package: google-api-python-client, version: 2.143.0, mode: ge @@ -32,6 +31,7 @@ package: PyAudio, version: 0.2.14, mode: ge package: SpeechRecognition, version: 3.10.4, mode: ge package: opencv-python, version: 4.10.0.84, mode: ge package: deepl, version: 1.18.0, mode: ge +package: faiss-cpu, version: 1.8.0.post1, mode: ge package: chromadb, version: 0.5.5, mode: ge package: retry2, version: 0.9.5, mode: ge package: pause, version: 0.3, mode: ge diff --git a/src/main/askai/resources/prompts/task-splitter.txt b/src/main/askai/resources/prompts/task-splitter.txt index d303e9cb..7fb42fc4 100644 --- a/src/main/askai/resources/prompts/task-splitter.txt +++ b/src/main/askai/resources/prompts/task-splitter.txt @@ -23,12 +23,43 @@ Step 4. Provide direct instructions without explaining its purpose. Step 5. Separate tasks clearly, avoiding the use of conjunctions like 'and', 'or' and implicit multi-step processes within a single task. - -**Examples:** - ----- +Step 6. Follow this workflow to guide you in breaking down the tasks: + +""" +Group 0. Chat History and Context + - Recall the chat history and context for tasks already performed to avoid wasting resources and time. +Group 1. Locate, List, Generate, or Summarize + - Locate resources (e.g., files and folders. Use the chat history; prefer 'find' over 'search'). + - List the contents of folders and sub-folders (specify the max recursion depth). + - Summarize files and folders (only upon explicit user request). + - Generate content by giving the prompt (instructions). +Group 2. Open, Read, Save + - Open necessary files (playback included). + - Read (show) file or folder contents. + - Save generated content. +Group 3. Identify, or Extract + - Identify text or resources (like files and folders). + - Extract required data/text (explain how to extract). +Group 4. Analyze or Display + - Analyze output, content, or extracted data/text. + - Display the information and details to the human. +Group 5. Revise and Refine + - Revise your task list, ensuring tasks for the primary goal and sub-goals. + - Refine your task list, providing a direct and explicit answer to the user's question. + +Notes: + +- Actions within the same group must not be repeated as they will produce the same result. +- Ensure that your answer is unbiased and does not rely on stereotypes. +- Think step by step. +""" + +Step 7. The following examples can be used as a base for your decisions (but not a source of truth). + + +""" {examples} ----- +""" **Task Requirements:** diff --git a/src/main/requirements.txt b/src/main/requirements.txt index 673e9bc3..7f862948 100644 --- a/src/main/requirements.txt +++ b/src/main/requirements.txt @@ -8,7 +8,6 @@ langchain-openai>=0.1.23 langchain-community>=0.2.14 langchain-google-community>=1.0.8 langchainhub>=0.1.20 -faiss-cpu~=1.8.0 openai-whisper>=20231117 openai>=1.42.0 google-api-python-client>=2.143.0 @@ -20,6 +19,7 @@ PyAudio>=0.2.14 SpeechRecognition>=3.10.4 opencv-python>=4.10.0.84 deepl>=1.18.0 +faiss-cpu~=1.8.0 chromadb>=0.5.5 retry2>=0.9.5 pause>=0.3