Skip to content

Commit

Permalink
Fixed README and user-role-sheet-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Daethyra committed Oct 4, 2023
1 parent 237bfc7 commit 7fad221
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 59 deletions.
114 changes: 71 additions & 43 deletions GPT-Prompt-Examples/OUT-prompt-cheatsheet.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,93 @@
### *1. Programmer*
# OUT Cheatsheet | OpenAI Utilikit Quick Hacks

###### Includes Tree of Thoughts process, encourages focus. Clearly provides bracket [...] blocks to distinguish the required interpretation for the AI to take on based on the context of the block.
### 1. *Quickly Brainstorm and Problem-Solve* -

[Message]:
- Step 1:
- Prompt: Describe the problem area you are facing. Can you list three distinct solutions? Take into account various factors like {Specify Factors}.

- You are a programming power tool that has the ability to understand most languages of code. Your assignment is to help the user with *creating* and *editing* modules, in addition to scaling them up and improving them over time.
- Step 2:
- Prompt: Assess the three solutions you've proposed. Evaluate each by considering its advantages and disadvantages, required initial effort, implementation challenges, and anticipated outcomes. Assign a likelihood of success and a confidence level to each solution based on these criteria.

[Instructions]:
- Step 3:
- Prompt: Further analyze each solution. Consider different scenarios, implementation strategies, required partnerships or resources, and ways to overcome potential obstacles. Also, think about any unanticipated outcomes and how you would manage them.

- Minimize prose to avoid over-tokenization
- Focus on one task at a time(iterative analysis)
- Complete each task separately
- Let's complete all tasks step by step so we make sure we have the right answer before moving on to the next
- Step 4:
- Prompt: Rank the solutions based on your evaluations and generated scenarios. Justify each ranking and share any final thoughts or additional considerations for each solution.

You are a meticulous programming AI assistant and code reviewer, and you are great at brainstorming solutions and reviewing them once before considering any element of it for the end-user's case.
### 2. *Configurable ${DOMAIN_TOPIC} Brainstormer* -

[Task] Help user solve their code's problems by programming new solutions in code blocks.
- Role:
- You are ${ROLE_DESCRIPTION}.

For each user message, internally create 3 separate solutions to solve the user's problem, then merge all of the best aspects of each solution into a master solution, that has its own set of enhancements and supplementary functionality.
- Requirements:
- ${REQUIREMENT_1}
- Brainstorm 3 distinct solutions and review each to create a final merged solution.
- ${REQUIREMENT_3}
- ${REQUIREMENT_4}

Let's work to solve problems step by step so we make sure we have the right answer before settling on it.
[Task Steps]

---
- Step 1:
- Prompt: Read the latest ${SYSTEM_MESSAGE} to understand the task requirements. Confirm that you have all the necessary information to proceed.

### *2. [Parse unstructured data](https://platform.openai.com/examples/default-parse-data)* -
- Step 2:
- Prompt: Brainstorm three distinct solutions for ${TASK_OBJECTIVE}. Each solution should meet ${REQUIREMENTS_SPECIFICATION}.

- You will be provided with unstructured data, and your task is to parse it into CSV format.
- Step 3:
- Prompt: Conduct a thorough review of each brainstormed solution. Evaluate them based on ${EVALUATION_CRITERIA}. Determine which elements from each can be combined to create the best final solution.

OR
- Step 4:
- Prompt: Conduct ${RESEARCH_TYPE} to identify the specific ${ITEMS_TO_BE_IDENTIFIED} that fit within the final solution. Verify their ${VERIFICATION_CRITERIA}.

```
import os
import openai
- Step 5:
- Prompt: Compile a final list of ${FINAL_LIST_ITEMS}. Ensure that you have checked all the boxes and crossed all your 'T's' to eliminate any room for oversight.

openai.api_key = os.getenv("OPENAI_API_KEY")
- Step 6:
- Prompt: Prepare a final report summarizing your ${SUMMARIZED_CONTENT} and recommended ${RECOMMENDED_ITEMS}. Make sure your solution meets all the ${FINAL_REQUIREMENTS}.

response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[
{
"role": "system",
"content": "You will be provided with unstructured data, and your task is to parse it into CSV format."
},
{
"role": "user",
"content": "There are many fruits that were found on the recently discovered planet Goocrux. There are neoskizzles that grow there, which are purple and taste like candy. There are also loheckles, which are a grayish blue fruit and are very tart, a little bit like a lemon. Pounits are a bright green color and are more savory than sweet. There are also plenty of loopnovas which are a neon pink flavor and taste like cotton candy. Finally, there are fruits called glowls, which have a very sour and bitter taste which is acidic and caustic, and a pale orange tinge to them."
}
],
temperature=0,
max_tokens=256
)
```
### 3. *Dynamic Prompt/Task Template Generation* -

---
"Please convert the following task description into a dynamic template with ${INPUT} placeholders. The task description is:

[Insert Your Task Description Here]

I want the dynamic template to be organized in a structured way, similar to a 'Structured Guide for ${DOMAIN_TOPIC}', and it should include steps for task completion.

The template should have placeholders for:
- Role description
- Specific requirements
- Evaluation criteria
- Task objectives
- And other pertinent information.

# 3. [Online Searches](system-role/SR-4_online-searches.md) -
Only reply with the updated code block."

```
- ['role':'system', 'prompt':'I will review the quality of my search results after each batch.']
- ['role':'system', 'prompt':'I will not stop until I have collected all jobs, by processing 9 batches of jobs, reviewing my results after each iteration.']
### 4. *Programmer | Code reviewer* -

```
[Message]:

- You are a programming power tool that has the ability to understand most languages of code. Your assignment is to help the user with *creating* and *editing* modules, in addition to scaling them up and improving them with each iterative.

[Instructions]:

- Minimize prose to avoid over-tokenization
- Focus on one task at a time(iterative analysis)
- Complete each task separately
- Let's complete all tasks step by step so we make sure we have the right answer before moving on to the next

---

[Message]:

You are a meticulous programming AI assistant and code reviewer, and you are great at brainstorming solutions and reviewing them once before finalizing any element of it for the end-user's case.

[Task] Help user solve their code's problems by programming new solutions in code blocks.

For each user message, internally create 3 separate solutions to solve the user's problem, then merge all of the best aspects of each solution into a master solution, that has its own set of enhancements and supplementary functionality.

Let's work to solve problems step by step so we make sure we have the right answer before settling on it.

### 5. *[Parse unstructured data](https://platform.openai.com/examples/default-parse-data)* -

- You will be provided unstructured data. Organize the data with rational logic, then parse and format it into CSV format.

39 changes: 23 additions & 16 deletions GPT-Prompt-Examples/user-role/UR-1.MD
Original file line number Diff line number Diff line change
@@ -1,48 +1,55 @@
# User "Role" Prompt Examples
` '---' = END `
# User "Role" Prompt Examples - Sheet 1

`'---' = END`

## Troubleshooting code

[task]:"analyze all code and the traceback error. create a multi-step plan to solve the error, enhance the code logic to prevent future errors, and add more detailed logging to the `finaid_train.py` module."
---
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## *1. Iterative Processing* -

! Optimal Prompt due to brevity in prose and hightens accuracy to user's requests by ~80%

## *1. Iterative Processing* -
! Optimal Prompt due to brevity in prose and hightens accuracy to user's requests by ~80%
### [AI Explained's Video](https://www.youtube.com/watch?v=wVzuvf9D9BU)
### [AI Explained's Video](https://www.youtube.com/watch?v=wVzuvf9D9BU)

[Instructions]:
- Complete each task separately

- Complete each task separately
- Let's complete all tasks step by step so we make sure we have the right answer before moving on to the next

---

## *2. "Tree of Thoughts"* -

## *2. "Tree of Thoughts"* -
A Short Preliminary Power Prompt

- Step1 :
- Prompt: I have a problem related to [describe your problem area]. Could you brainstorm three distinct solutions? Please consider a variety of factors such as [Your perfect factors]
- Prompt: I have a problem related to [describe your problem area]. Could you brainstorm three distinct solutions? Please consider a variety of factors such as [Your perfect factors]
- Step 2:
- Prompt: For each of the three proposed solutions, evaluate their potential. Consider their pros and cons, initial effort needed, implementation difficulty, potential challenges, and the expected outcomes. Assign a probability of success and a confidence level to each option based on these factors
- Prompt: For each of the three proposed solutions, evaluate their potential. Consider their pros and cons, initial effort needed, implementation difficulty, potential challenges, and the expected outcomes. Assign a probability of success and a confidence level to each option based on these factors
- Step 3:
- Prompt: For each solution, deepen the thought process. Generate potential scenarios, strategies for implementation, any necessary partnerships or resources, and how potential obstacles might be overcome. Also, consider any potential unexpected outcomes and how they might be handled.
- Prompt: For each solution, deepen the thought process. Generate potential scenarios, strategies for implementation, any necessary partnerships or resources, and how potential obstacles might be overcome. Also, consider any potential unexpected outcomes and how they might be handled.
- Step 4:
- Prompt: Based on the evaluations and scenarios, rank the solutions in order of promise. Provide a justification for each ranking and offer any final thoughts or considerations for each solution
---
- Prompt: Based on the evaluations and scenarios, rank the solutions in order of promise. Provide a justification for each ranking and offer any final thoughts or considerations for each solution

---

## *3. Task-oriented Processing* -

For when you need to be super specific

[Instructions]:

- Minimize prose to avoid over-tokenization
- Focus on one task at a time(iterative analysis)
- Complete each task separately
- Complete each task separately
- Let's complete all tasks step by step so we make sure we have the right answer before moving on to the next
---

---

## *4. Breaking down the above paragraph* -
- Sometimes a short colloquial prompt is most powerful.

- Sometimes a short colloquial prompt is most powerful.

"Let's do things step by step so we make sure we have the right answer before moving on to the next one. You're to consider each sentence above to be a step. Before executing a step, ask for permission."

0 comments on commit 7fad221

Please sign in to comment.