Prompt Generator
Create high-quality, structured prompts using meta-prompting best practices: task decomposition, expert personas, iterative verification, and hallucination minimization.
Workflow
Bước 0: Detect Mode
| User cung cấp |
Mode |
Hành động |
| Mô tả yêu cầu (chưa có prompt) |
Create |
Chạy Phase 1 → 2 → 3 → 4 |
| Prompt có sẵn cần cải tiến |
Refine |
Chạy checklist Phase 4 trước → xác định điểm yếu → sửa theo kết quả |
Phase 1: Gather Requirements
Ask the user (one at a time, maximum 4 questions). Skip when answers are obvious from context.
Type: Detect or ask — what type of prompt?
- System prompt: Persistent AI behavior across a conversation
- Task prompt: One-shot, input → specific output
- Conversational prompt: Multi-turn, requires memory/context handling
- Role prompt: Character/persona, tone-focused
Goal: "What is the primary goal or role of the system you want to create?"
Output: "What specific outputs do you expect? (format, length, style)"
Accuracy: "How should it handle uncertainty? (disclaim, ask for sources, or best-effort)"
Minimize friction — 1-2 questions usually suffice when context is clear.
Phase 2: Decompose (if needed)
| Tín hiệu |
Decompose? |
| Prompt yêu cầu >= 3 expert domains khác nhau |
Yes |
| Output cần cả phân tích + sáng tạo + validation |
Yes |
| Single domain, straightforward input → output |
No — skip to Phase 3 |
Khi decompose, assign expert personas — mỗi expert nhận instructions riêng, không shared memory:
- Expert Writer — copywriting, narrative, tone
- Expert Analyst — data, logic, verification
- Expert Python — code generation, computation
- Expert [Domain] — specialized knowledge
"Fresh eyes" — không assign cùng expert cho cả create AND validate.
Phase 3: Generate the Prompt
Consolidate vào 1 prompt cohesive. Dùng prompt-template — chỉ include sections phù hợp, omit phần không relevant.
Lưu ý khi generate:
- Match prompt structure theo prompt type (system vs task vs conversational vs role)
- Ưu tiên "must NOT" over "should" — negative framing hiệu quả hơn vì giảm ambiguity
Phase 4: Verify and Deliver
Self-review checklist trước khi deliver:
Then:
- Present the final prompt, organized and easy to follow
- Note expert reviews if used
- Offer to iterate if user wants adjustments
Anti-patterns to Avoid
When reviewing or generating prompts, flag these issues:
- Vague virtues: "Write a good summary" → "Write a 3-sentence summary focusing on key findings and action items"
- Overloaded prompt: Too many tasks in one prompt → suggest splitting
- Sycophancy traps: "Always agree" or "Never say no" → remove
- Missing scope: "Write marketing copy" without audience, channel, tone → clarify
- Prompt stuffing: Repeating the same instruction in multiple sections → deduplicate
1---2name: prompt-generator3description: Tạo hoặc cải tiến prompt chất lượng cao bằng meta-prompting với task decomposition, expert personas và verification checklist.4---56# Prompt Generator78Create high-quality, structured prompts using meta-prompting best practices: task decomposition, expert personas, iterative verification, and hallucination minimization.910## Workflow1112### Bước 0: Detect Mode1314| User cung cấp | Mode | Hành động |15|---|---|---|16| Mô tả yêu cầu (chưa có prompt) | **Create** | Chạy Phase 1 → 2 → 3 → 4 |17| Prompt có sẵn cần cải tiến | **Refine** | Chạy checklist Phase 4 trước → xác định điểm yếu → sửa theo kết quả |1819### Phase 1: Gather Requirements2021Ask the user (one at a time, maximum 4 questions). Skip when answers are obvious from context.22231. **Type**: Detect or ask — what type of prompt?24 - **System prompt**: Persistent AI behavior across a conversation25 - **Task prompt**: One-shot, input → specific output26 - **Conversational prompt**: Multi-turn, requires memory/context handling27 - **Role prompt**: Character/persona, tone-focused28292. **Goal**: "What is the primary goal or role of the system you want to create?"30313. **Output**: "What specific outputs do you expect? (format, length, style)"32334. **Accuracy**: "How should it handle uncertainty? (disclaim, ask for sources, or best-effort)"3435Minimize friction — 1-2 questions usually suffice when context is clear.3637### Phase 2: Decompose (if needed)3839| Tín hiệu | Decompose? |40|---|---|41| Prompt yêu cầu >= 3 expert domains khác nhau | Yes |42| Output cần cả phân tích + sáng tạo + validation | Yes |43| Single domain, straightforward input → output | No — skip to Phase 3 |4445Khi decompose, assign expert personas — mỗi expert nhận instructions riêng, không shared memory:4647- **Expert Writer** — copywriting, narrative, tone48- **Expert Analyst** — data, logic, verification49- **Expert Python** — code generation, computation50- **Expert [Domain]** — specialized knowledge5152"Fresh eyes" — không assign cùng expert cho cả create AND validate.5354### Phase 3: Generate the Prompt5556Consolidate vào 1 prompt cohesive. Dùng [prompt-template](references/prompt-template.md) — chỉ include sections phù hợp, omit phần không relevant.5758Lưu ý khi generate:59- Match prompt structure theo prompt type (system vs task vs conversational vs role)60- Ưu tiên "must NOT" over "should" — negative framing hiệu quả hơn vì giảm ambiguity6162### Phase 4: Verify and Deliver6364Self-review checklist trước khi deliver:6566- [ ] No vague virtue words ("good", "helpful", "detailed") without specific definition67- [ ] No contradictory instructions (e.g., "be concise" + "include all details")68- [ ] No implicit assumptions — all context is explicitly stated69- [ ] Negative constraints are included (what NOT to do)70- [ ] Prompt type matches the use case71- [ ] If complex: suggest splitting into multi-prompt pipeline instead of mega-prompt7273Then:74- Present the final prompt, organized and easy to follow75- Note expert reviews if used76- Offer to iterate if user wants adjustments7778## Anti-patterns to Avoid7980When reviewing or generating prompts, flag these issues:8182- **Vague virtues**: "Write a good summary" → "Write a 3-sentence summary focusing on key findings and action items"83- **Overloaded prompt**: Too many tasks in one prompt → suggest splitting84- **Sycophancy traps**: "Always agree" or "Never say no" → remove85- **Missing scope**: "Write marketing copy" without audience, channel, tone → clarify86- **Prompt stuffing**: Repeating the same instruction in multiple sections → deduplicate