Prompt Engineering Toolkit
# Prompt Engineering Toolkit
A modular, evidence-based template system for writing effective LLM prompts.
---
## 1. Design Principles
Each principle below is grounded in findings from cross-provider documentation (OpenAI, Anthropic, Google), peer-reviewed research, and validated practitioner patterns.
### P1 — Task Specificity Over Vagueness
Describing **what the output should look like** beats describing **how good it should be**. "Clear and under 100 words" outperforms "professional and polished" every time. Bsharat et al. (2023) measured a 57.7% quality improvement when explicit format constraints were added — even against deliberately weak baselines, the direction is unambiguous. All three major providers independently recommend this as the single highest-ROI prompting habit.
### P2 — Structure Before Length
Structured short prompts consistently outperform verbose unstructured ones. Google's Gemini 3 guide warns the model "may over-analyze verbose or overly complex prompt engineering techniques." OpenAI's GPT-5.4 guidance: "Start with the smallest prompt that passes your evals." The template system below is therefore modular — start minimal, add blocks only when they solve a measured problem.
### P3 — Information Placement Matters
The "Lost in the Middle" finding (Liu et al. 2023, 2500+ citations) shows a U-shaped attention curve: models attend far more to content at the **beginning and end** of prompts. Place instructions and constraints at the start. Place input data after instructions. Place your most important constraint or quality bar last if it's short.
### P4 — Positive Framing
All three providers recommend telling the model **what to do**, not what to avoid. Negative instructions force the model to process the unwanted concept, potentially increasing its probability — Anthropic calls this the "Pink Elephant Problem." Google warns broad negatives like "do not infer" can break basic reasoning.
**Fix:** "Write in plain language accessible to a general audience" instead of "Don't use jargon."
### P5 — Examples Beat Descriptions
Few-shot examples (2–5) are among the highest-ROI techniques. Min et al. (2022) found that format, distribution, and label space of examples matter more than whether individual labels are correct. But more is not always better — the "over-prompting" effect (2025) shows performance peaks then declines with excessive examples.
**Rule of thumb:** Start with 2–3 high-quality diverse examples. Add more only if output quality improves.
### P6 — Decompose Complex Tasks
Breaking a complex prompt into sub-tasks — either as numbered steps within one prompt or as a chain of separate prompts — is supported by all three providers. OpenAI measured +20% agentic pass rate when planning instructions were added. Academic decomposed-prompting research confirms the mechanism.
### P7 — Permit Uncertainty
Instructing the model to say "I don't know" or "I'm not sure" when uncertain reduces hallucination across all tested models. This is cheap, effective, and under-used. All three providers explicitly recommend it.
### P8 — Match Delimiters to Model
Claude was trained on XML tags. GPT prefers Markdown headers. Gemini accepts both but demands consistency. Using the right format for your model doesn't change whether the prompt works, but it affects how well it works. The templates below use model-agnostic section headers that can be trivially converted.
### P9 — Iterate Empirically
Every provider describes prompt engineering as "inherently empirical." The best practitioners run experiments and take notes. A prompt that works on GPT-4o may degrade on GPT-5. The template system below includes a review step not because it's always needed, but because it's cheap insurance for high-stakes tasks.
---
## 2. Master Multi-Purpose Prompt Templatewhen to use it
Community prompt sourced from the open-source GitHub repo SidneyMe/prompts-and-frameworks (MIT). A "Prompt Engineering Toolkit" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
SidneyMe/prompts-and-frameworks · MIT
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions