|
1 | 1 | # Master Prompt Creator |
2 | 2 |
|
3 | | -A web-based tool designed to help users construct high-quality, well-structured, and effective prompts for Large Language Models (LLMs) through a guided, step-by-step process. |
| 3 | +A web-based tool designed to help users construct high-quality, well-structured, and effective prompts for Large Language Models (LLMs) through a guided, step-by-step process with model-specific optimization. |
4 | 4 |
|
5 | 5 | ## Overview |
6 | 6 |
|
7 | | -The Master Prompt Creator transforms a user's basic idea into a detailed, optimized prompt. It employs a wizard-like interface to ask clarifying questions based on established prompt engineering principles. The final output provides both a raw, structured prompt and an AI-enhanced version, leveraging the Gemini API for automated optimization. |
8 | | - |
9 | | -## Key Features |
10 | | - |
11 | | -- **Guided Prompt Construction**: A multi-step questionnaire guides users through defining the core components of a good prompt: Role, Directive, Context, Constraints, Output Format, Tone, and Examples. |
12 | | -- **AI-Powered Example Generation**: If a user needs help creating few-shot examples, the tool can call the Gemini API to generate relevant input/output pairs based on the task description. |
13 | | -- **Automated Prompt Enhancement**: After the user builds their "raw" prompt, the tool makes a second API call to have an "expert prompt engineer" (simulated by another LLM) refine and optimize the prompt for clarity, conciseness, and effectiveness. |
14 | | -- **Side-by-Side Comparison**: The final screen displays the user-generated raw prompt and the AI-enhanced version, allowing for easy comparison and copying. |
15 | | -- **Zero Dependencies**: The entire application is a single `index.html` file with no external frameworks, making it extremely portable and easy to run. |
16 | | -- **Clean, Responsive UI**: Styled with Tailwind CSS for a modern and intuitive user experience on all devices. |
17 | | - |
18 | | -## How It Works |
19 | | - |
20 | | -1. **Initial Task**: The user starts by entering the core task they want the LLM to perform. |
21 | | -2. **Clarification Wizard**: The application presents a series of questions, one by one. The user's answers are saved as they progress through the steps. |
22 | | -3. **Generate Examples (Optional)**: On the "Examples" step, the user can click a button to have the Gemini API generate examples for them. |
23 | | -4. **Generate Master Prompt**: Once all questions are answered, the tool assembles the answers into a structured "Raw Prompt." |
24 | | -5. **Enhance with AI**: Concurrently, the raw prompt is sent to the Gemini API with a meta-prompt asking it to act as an expert and improve the prompt. |
25 | | -6. **Display & Use**: Both prompts are displayed. The user can copy their preferred version with a single click. |
| 7 | +The Master Prompt Creator transforms a user's basic idea into a detailed, optimized prompt using official best practices from OpenAI, Anthropic, and Google. It employs a wizard-like interface to ask clarifying questions based on established prompt engineering principles, then generates both a structured prompt and an AI-enhanced version optimized for the user's target LLM. |
| 8 | + |
| 9 | +## 🎯 Key Features |
| 10 | + |
| 11 | +### **Core Functionality** |
| 12 | +- **Guided Prompt Construction**: Multi-step questionnaire covering Role, Directive, Context, Constraints, Output Format, Tone, Examples, Creativity Level, and Error Handling |
| 13 | +- **Model-Specific Optimization**: Tailored enhancement based on target LLM (GPT-4, Claude, Gemini) |
| 14 | +- **AI-Powered Example Generation**: Gemini API generates relevant input-output pairs |
| 15 | +- **Automated Prompt Enhancement**: Expert-level prompt optimization using model-specific best practices |
| 16 | +- **Quality Assessment**: Real-time prompt scoring (0-100%) with improvement recommendations |
| 17 | + |
| 18 | +### **Advanced Features** |
| 19 | +- **Official Resource Integration**: Direct links to OpenAI, Anthropic, and Google prompting guides |
| 20 | +- **Model-Specific Techniques**: Applies platform-specific optimization (XML tags for Claude, system messages for GPT-4, etc.) |
| 21 | +- **Quality Indicators**: Visual scoring with green/yellow/red quality badges |
| 22 | +- **Side-by-Side Comparison**: Raw vs. enhanced prompts with copy functionality |
| 23 | +- **Zero Dependencies**: Single HTML file with no external frameworks |
| 24 | +- **Responsive Design**: Modern UI with Tailwind CSS |
| 25 | + |
| 26 | +## 🚀 How It Works |
| 27 | + |
| 28 | +### **Step-by-Step Process** |
| 29 | +1. **Initial Task**: User enters the core task they want the LLM to perform |
| 30 | +2. **Guided Questionnaire**: 8-step wizard covering all essential prompt components: |
| 31 | + - Directive (specific action/command) |
| 32 | + - Role/Persona (expert identity) |
| 33 | + - Context (background information) |
| 34 | + - Tone & Audience (communication style) |
| 35 | + - Output Format (structure requirements) |
| 36 | + - Constraints (limitations/rules) |
| 37 | + - Examples (few-shot demonstrations) |
| 38 | + - Creativity Level (factual vs. creative approach) |
| 39 | + - Error Handling (uncertainty management) |
| 40 | + - Target LLM (optimization preference) |
| 41 | + |
| 42 | +3. **AI-Powered Assistance**: |
| 43 | + - Generate examples automatically using Gemini API |
| 44 | + - Refine text with AI enhancement at any step |
| 45 | + |
| 46 | +4. **Quality Assessment**: Real-time prompt scoring with specific recommendations |
| 47 | + |
| 48 | +5. **Model-Specific Enhancement**: |
| 49 | + - GPT-4: System messages, few-shot prompting, chain-of-thought |
| 50 | + - Claude: XML structure, Constitutional AI principles |
| 51 | + - Gemini: System instructions, structured output, multimodal support |
| 52 | + |
| 53 | +6. **Final Output**: Side-by-side comparison of raw and enhanced prompts with quality indicators |
26 | 54 |
|
27 | 55 | ## Technology Stack |
28 | 56 |
|
@@ -53,6 +81,52 @@ This application is designed to be secure and does not come with a pre-loaded AP |
53 | 81 |
|
54 | 82 | Your API key is saved securely in your browser's `localStorage` and is **never shared or stored outside of your machine**. You only need to do this once per browser. |
55 | 83 |
|
| 84 | +## 📚 Documentation |
| 85 | + |
| 86 | +### **Core Documentation** |
| 87 | +- **[Master Prompt Generation Rules](master-prompt-generation-rules.md)**: Comprehensive rules and structure for generating high-quality prompts |
| 88 | +- **[Official Best Practices Summary](official-prompting-best-practices-summary.md)**: Key principles from OpenAI, Anthropic, and Google documentation |
| 89 | +- **[Official Resources](official-prompting-resources.md)**: Direct links to all official prompting guides and examples |
| 90 | + |
| 91 | +### **Technical Guides** |
| 92 | +- **[Comprehensive Guidelines](prompting-guidelines-comprehensive.md)**: Detailed prompting techniques and strategies |
| 93 | +- **[Steering Rules](.kiro/steering/prompting-best-practices.md)**: Active rules used by the application for prompt generation |
| 94 | + |
| 95 | +### **Model-Specific Optimization** |
| 96 | +The application automatically applies best practices from: |
| 97 | +- **OpenAI GPT-4**: https://platform.openai.com/docs/guides/prompt-engineering |
| 98 | +- **Anthropic Claude**: https://docs.anthropic.com/claude/docs/prompt-engineering |
| 99 | +- **Google Gemini**: https://ai.google.dev/gemini-api/docs/prompting-strategies |
| 100 | + |
| 101 | +### **Quality Standards** |
| 102 | +- **80%+ Quality Score**: Production-ready prompts with comprehensive components |
| 103 | +- **Model-Specific Techniques**: Automatic application of platform-optimized structures |
| 104 | +- **Safety Guidelines**: Built-in bias prevention and content safety measures |
| 105 | +- **Official Compliance**: All techniques sourced from official documentation |
| 106 | + |
| 107 | +## 🎯 Usage Examples |
| 108 | + |
| 109 | +### **For GPT-4 Optimization** |
| 110 | +Set Target LLM to "GPT-4" to automatically apply: |
| 111 | +- System message structure |
| 112 | +- Few-shot prompting with examples |
| 113 | +- Chain-of-thought reasoning |
| 114 | +- Temperature control guidance |
| 115 | + |
| 116 | +### **For Claude Optimization** |
| 117 | +Set Target LLM to "Claude" to automatically apply: |
| 118 | +- XML tag structure (`<thinking>`, `<context>`, `<output>`) |
| 119 | +- Constitutional AI principles |
| 120 | +- Direct, explicit instructions |
| 121 | +- Long context utilization |
| 122 | + |
| 123 | +### **For Gemini Optimization** |
| 124 | +Set Target LLM to "Gemini" to automatically apply: |
| 125 | +- System instruction format |
| 126 | +- Structured output formatting |
| 127 | +- Multimodal considerations |
| 128 | +- Safety settings integration |
| 129 | + |
56 | 130 | ## License |
57 | 131 |
|
58 | 132 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
0 commit comments