Skip to content

Commit

Permalink
Put back task guidelines on task-slitter prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
yorevs committed Sep 4, 2024
1 parent bf9cdcf commit b9e52bc
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dependencies.hspd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
41 changes: 36 additions & 5 deletions src/main/askai/resources/prompts/task-splitter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:**
Expand Down
2 changes: 1 addition & 1 deletion src/main/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b9e52bc

Please sign in to comment.