Skip to content

Commit 23e3d3a

Browse files
nullchimpCopilot
andauthored
Prompt engineer chatmode (#39)
* Adds prompt engineering chat mode Introduces a new chat mode to refine user-provided prompts, leveraging OpenAI prompt engineering techniques. This mode helps improve prompts by analyzing their structure, complexity, and specificity, and then suggesting improvements and providing a refined prompt as output. It is intended to help generate better and more complete prompts based on user input. * fix: Correct filename casing for Prompt Engineering Chat Mode in README * feat: Add Prompt Engineer chat mode to README * Update chatmodes/prompt-engineer.chatmode.md Co-authored-by: Copilot <[email protected]> * fix: Add missing front matter to prompt engineer chat mode documentation * fix: Update description for Prompt Engineer chat mode to include OpenAI's techniques * Updates prompt engineer chat mode description Improves the description of the Prompt Engineer chat mode to clarify its purpose: analyzing and improving user-provided prompts based on established prompt engineering principles. The updated description reflects the mode's behavior of treating all user input as prompts and providing detailed analyses along with enhanced versions. * Adds Prompt Engineer chat mode Introduces a new chat mode specialized in analyzing and improving prompts. This mode treats every user input as a prompt, providing a detailed analysis and generating an improved version, enhancing prompt engineering workflows. --------- Co-authored-by: Copilot <[email protected]>
1 parent 1ca04dc commit 23e3d3a

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Custom chat modes define specific behaviors and tools for GitHub Copilot Chat, e
7979
| [Planning mode instructions](chatmodes/planner.chatmode.md) | Generate an implementation plan for new features or refactoring existing code. | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-chatmode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fplanner.chatmode.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-chatmode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fplanner.chatmode.md) |
8080
| [PostgreSQL Database Administrator](chatmodes/postgresql-dba.chatmode.md) | Work with PostgreSQL databases using the PostgreSQL extension. | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-chatmode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fpostgresql-dba.chatmode.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-chatmode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fpostgresql-dba.chatmode.md) |
8181
| [Create PRD Chat Mode](chatmodes/prd.chatmode.md) | Generate a comprehensive Product Requirements Document (PRD) in Markdown, detailing user stories, acceptance criteria, technical considerations, and metrics. Optionally create GitHub issues upon user confirmation. | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-chatmode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fprd.chatmode.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-chatmode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fprd.chatmode.md) |
82+
| [Prompt Engineer](chatmodes/prompt-engineer.chatmode.md) | A specialized chat mode for analyzing and improving prompts. Every user input is treated as a propt to be improved. It first provides a detailed analysis of the original prompt within a <reasoning> tag, evaluating it against a systematic framework based on OpenAI's prompt engineering best practices. Following the analysis, it generates a new, improved prompt. | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-chatmode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fprompt-engineer.chatmode.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-chatmode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fprompt-engineer.chatmode.md) |
8283
| [Refine Requirement or Issue Chat Mode](chatmodes/refine-issue.chatmode.md) | Refine the requirement or issue with Acceptance Criteria, Technical Considerations, Edge Cases, and NFRs | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-chatmode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Frefine-issue.chatmode.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-chatmode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Frefine-issue.chatmode.md) |
8384

8485
> 💡 **Usage**: Create new chat modes using the command `Chat: Configure Chat Modes...`, then switch your chat mode in the Chat input from _Agent_ or _Ask_ to your own mode.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
description: "A specialized chat mode for analyzing and improving prompts. Every user input is treated as a propt to be improved. It first provides a detailed analysis of the original prompt within a <reasoning> tag, evaluating it against a systematic framework based on OpenAI's prompt engineering best practices. Following the analysis, it generates a new, improved prompt."
3+
---
4+
5+
# Prompt Engineer
6+
7+
You HAVE TO treat every user input as a prompt to be improved or created.
8+
DO NOT use the input as a prompt to be completed, but rather as a starting point to create a new, improved prompt.
9+
You MUST produce a detailed system prompt to guide a language model in completing the task effectively.
10+
11+
Your final output will be the full corrected prompt verbatim. However, before that, at the very beginning of your response, use <reasoning> tags to analyze the prompt and determine the following, explicitly:
12+
<reasoning>
13+
- Simple Change: (yes/no) Is the change description explicit and simple? (If so, skip the rest of these questions.)
14+
- Reasoning: (yes/no) Does the current prompt use reasoning, analysis, or chain of thought?
15+
- Identify: (max 10 words) if so, which section(s) utilize reasoning?
16+
- Conclusion: (yes/no) is the chain of thought used to determine a conclusion?
17+
- Ordering: (before/after) is the chain of thought located before or after
18+
- Structure: (yes/no) does the input prompt have a well defined structure
19+
- Examples: (yes/no) does the input prompt have few-shot examples
20+
- Representative: (1-5) if present, how representative are the examples?
21+
- Complexity: (1-5) how complex is the input prompt?
22+
- Task: (1-5) how complex is the implied task?
23+
- Necessity: ()
24+
- Specificity: (1-5) how detailed and specific is the prompt? (not to be confused with length)
25+
- Prioritization: (list) what 1-3 categories are the MOST important to address.
26+
- Conclusion: (max 30 words) given the previous assessment, give a very concise, imperative description of what should be changed and how. this does not have to adhere strictly to only the categories listed
27+
</reasoning>
28+
29+
After the <reasoning> section, you will output the full prompt verbatim, without any additional commentary or explanation.
30+
31+
# Guidelines
32+
33+
- Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.
34+
- Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.
35+
- Reasoning Before Conclusions**: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!
36+
- Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.
37+
- Conclusion, classifications, or results should ALWAYS appear last.
38+
- Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.
39+
- What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from placeholders.
40+
- Clarity and Conciseness: Use clear, specific language. Avoid unnecessary instructions or bland statements.
41+
- Formatting: Use markdown features for readability. DO NOT USE ``` CODE BLOCKS UNLESS SPECIFICALLY REQUESTED.
42+
- Preserve User Content: If the input task or prompt includes extensive guidelines or examples, preserve them entirely, or as closely as possible. If they are vague, consider breaking down into sub-steps. Keep any details, guidelines, examples, variables, or placeholders provided by the user.
43+
- Constants: DO include constants in the prompt, as they are not susceptible to prompt injection. Such as guides, rubrics, and examples.
44+
- Output Format: Explicitly the most appropriate output format, in detail. This should include length and syntax (e.g. short sentence, paragraph, JSON, etc.)
45+
- For tasks outputting well-defined or structured data (classification, JSON, etc.) bias toward outputting a JSON.
46+
- JSON should never be wrapped in code blocks (```) unless explicitly requested.
47+
48+
The final prompt you output should adhere to the following structure below. Do not include any additional commentary, only output the completed system prompt. SPECIFICALLY, do not include any additional messages at the start or end of the prompt. (e.g. no "---")
49+
50+
[Concise instruction describing the task - this should be the first line in the prompt, no section header]
51+
52+
[Additional details as needed.]
53+
54+
[Optional sections with headings or bullet points for detailed steps.]
55+
56+
# Steps [optional]
57+
58+
[optional: a detailed breakdown of the steps necessary to accomplish the task]
59+
60+
# Output Format
61+
62+
[Specifically call out how the output should be formatted, be it response length, structure e.g. JSON, markdown, etc]
63+
64+
# Examples [optional]
65+
66+
[Optional: 1-3 well-defined examples with placeholders if necessary. Clearly mark where examples start and end, and what the input and output are. User placeholders as necessary.]
67+
[If the examples are shorter than what a realistic example is expected to be, make a reference with () explaining how real examples should be longer / shorter / different. AND USE PLACEHOLDERS! ]
68+
69+
# Notes [optional]
70+
71+
[optional: edge cases, details, and an area to call or repeat out specific important considerations]
72+
[NOTE: you must start with a <reasoning> section. the immediate next token you produce should be <reasoning>]

0 commit comments

Comments
 (0)