AI Skill Report Card
Architecting Prompts
YAML--- name: architecting-prompts description: Analyzes, creates, and refines prompts for AI language models (Claude, ChatGPT, Gemini) using evidence-based techniques like self-consistency, chain-of-thought, and plan-and-solve. Use when creating new prompts for repeated/programmatic use, troubleshooting underperforming prompts, building prompt libraries or templates, or applying systematic anti-pattern detection to improve prompt reliability. --- # Architecting Prompts Systematic framework for engineering high-quality prompts using research-backed techniques, structural optimization, and anti-pattern detection. Treats prompts as engineered artifacts, not casual queries.
Quick Start14 / 15
Given a weak prompt, apply the refinement checklist immediately:
Before:
Analyze this data and make it better.
After:
Analyze the attached user engagement dataset to identify weekly usage
trends and demographic segment differences.
Context: This informs a Q3 product roadmap decision for a subscription app.
Steps:
1. Identify the top 3 trends by statistical significance
2. Cross-check each trend against at least one alternative explanation
3. Flag any findings with insufficient data confidence
Output format:
- Executive summary (max 150 words)
- Bullet list of trends with supporting evidence
- "Confidence: High/Medium/Low" tag per finding
If the dataset has missing fields, note gaps explicitly rather than
guessing at values.
Recommendation▾
Add a brief guidance on handling conflicting techniques or when to stop iterating (diminishing returns) for completeness on edge cases
Workflow14 / 15
Progress:
- Step 0: Check for domain expertise (if working in a codebase/domain with prior context)
- Step 1: Diagnose — evaluate the existing/draft prompt across 6 dimensions
- Step 2: Clarify core intent — make the task unambiguous
- Step 3: Restructure — position info for attention, add hierarchy/delimiters
- Step 4: Add missing context — surface hidden assumptions
- Step 5: Apply matching technique(s) — self-consistency, CoT, plan-and-solve, few-shot
- Step 6: Add quality/verification mechanisms
- Step 7: Handle edge cases and failure modes
- Step 8: Specify output format explicitly
- Step 9: Score and validate against anti-pattern list
Step 1: Diagnostic Dimensions
Evaluate each on a quick pass; note failures:
| Dimension | Question |
|---|---|
| Intent & Clarity | Could a stranger tell exactly what's being asked? |
| Structure | Is critical info at start/end? Are sections delimited? |
| Context Sufficiency | Are assumptions, audience, and constraints explicit? |
| Technique Fit | Does the task type match an evidence-based technique? |
| Failure Modes | Is there vagueness, contradiction, or missing edge-case handling? |
| Formatting | Are delimiters and hierarchy used for parseability? |
Step 5: Technique Selection Guide
| Task type | Technique |
|---|---|
| Factual/analytical | Self-consistency (validate from multiple angles, flag uncertainty) |
| Math/logic/multi-step | Program-of-thought (explicit stepwise work) |
| Complex multi-stage workflow | Plan-and-solve (Plan → Execute → Verify) |
| Pattern-matching / formatting tasks | Few-shot examples (2-5 input-output pairs) |
| Open-ended reasoning | Chain-of-thought (show reasoning, then reflect) |
Only apply techniques the task actually needs — stacking all of them bloats the prompt.
Recommendation▾
Step 0 ('check for domain expertise') is underexplained compared to other steps — either elaborate briefly or fold it into Step 4
Examples17 / 20
Example 1: Vague instruction → specific
Input: "Summarize this."
Output:
Summarize the attached article in 3 bullet points, each under 25 words,
capturing the main argument, key evidence, and stated implication.
Audience: executives with no prior context on the topic.
Example 2: Missing edge-case handling
Input: "Extract email addresses from the text."
Output:
Extract all email addresses from the text below.
- If none are found, return an empty array `[]`.
- Validate format (must contain @ and a valid domain pattern); exclude malformed matches.
- Return as JSON: {"emails": ["...", "..."]}
Text:
"""
{{input_text}}
"""
Example 3: Complex task needing plan-and-solve
Input: "Refactor this module to improve performance."
Output:
Refactor the module below to improve performance.
First, produce a plan:
1. List current performance bottlenecks with reasoning
2. Propose specific changes, ranked by expected impact
3. Note any behavior-preserving risks
Then execute the refactor per your plan.
Finally, verify: confirm no public API changed and list which
bottlenecks were addressed.
Module:
```{{code}}```
Recommendation▾
Consider adding one 'bad output' example (an over-engineered or bloated prompt) alongside the good ones to reinforce the anti-pattern of technique overload
Best Practices
- Lead and close with the critical instruction. Attention peaks at start and end; bury supporting detail in the middle.
- Use explicit delimiters (
```, XML tags, headers) to separate instructions from data. - Make success criteria measurable — word counts, required fields, pass/fail conditions.
- State assumptions instead of hiding them — audience, purpose, format, prior knowledge.
- Match prompt length to task complexity — don't pad simple tasks; don't under-specify complex ones.
- Prefer examples over complex conditional rules when illustrating edge cases.
- Build in a verification step for any multi-stage or high-stakes task.
- Use neutral language — avoid words like "quickly" or "obviously" that bias effort or conclusions.
Common Pitfalls
- Vague instructions: "Make it better" — replace with concrete, checkable criteria.
- Contradictory requirements: "Be comprehensive but brief" — resolve by prioritizing explicitly (e.g., "150-word summary + detailed appendix").
- Over-complexity: deeply nested conditionals confuse more than they clarify — replace with examples.
- Unstated context: "format as usual" — always define the format inline.
- Ignoring edge cases: no instruction for empty/invalid/ambiguous input — always specify fallback behavior.
- Technique overload: stacking self-consistency + CoT + plan-and-solve on a simple task adds noise without benefit.
- Format ambiguity: never leave output structure implicit — specify JSON schema, bullet structure, or exact section order.