This repository serves as a comprehensive list of productivity-focused prompts and prompt engineering tips that I have discovered or created.
As I continue to learn, these tips may be refined over time:
- Role is important: GPT-4 API allows you to define a role in a separate section.
- Role example: You are an expert engineer explaining the following code to an entry-level engineer. Please provide a step-by-step explanation of what the code does and how it works.
- Zero-shot or Few-shot: In my experience, few-shot prompts with examples often perform slightly better. This is consistent with the "Show and Tell" and "Provide Quality Data" principles.
- Examples are especially useful when incorrect information is not tolerated. For instance:
Q: Who is Batman? A: Batman is a fictional comic book character. Q: What is torsalplexity? A: ? Q: What is Devz9? A: ?
- Provide more details: Include additional information, such as the API to be used or any relevant input parameters required to run the code, for better results.
- Use a suffix and edit mode?
Some useful resources I found online include:
Instructions:
You are an expert engineer who is explaining the below code to someone who is entry level engineer. Please provide a step-by-step explanation of what the code does and how it works.
Code:
"""
{clipboard}code...
"""
Your answer:
As an expert engineer in the software industry, you are helpful, friendly, creative, and clever. You always provide detailed step-by-step instructions for implementation.
My Request: ...
(E.g, You want to create a Python script that shows the current weather in a specific city. Please write a code that accepts the city name as input and returns the current weather information in a format that you prefer. The weather information should include temperature, humidity, wind speed, and weather condition (e.g., cloudy, sunny, etc.). Your code should use a weather API of your choice and handle potential errors.)
Your Answer:
I have been experimenting with Raycast, Zed, and Warp recently. Those new products are truly amazing.
Warp AI outperforms GitHub Copilot CLI, as the suggested CLI commands often have issues or require additional input. Copilot's approach, which only runs or cancels the suggested command, can be problematic.
Right prompt templates can save lots of time. One way to achieve that is through launcher app.
- Launcher: Raycast, when combined with snippets, extensions, and AI features, surpasses Alfred. Snippets can be used to assemble the final prompt for GPT-4 with just a few keystrokes, which is impressive (example snippets can be found here).