10 prompting techniques that actually work, from few-shot examples to self-critique
thisdudelikesAI · x · 2026-10-12
A widely shared infographic plus thread distills 10 prompting techniques said to genuinely move the needle:
- Few-shot examples: 2-5 good examples beat any amount of instruction
- Chain-of-thought: step-by-step reasoning, still works in 2026
- Role assignment: "you are a senior X doing Y" frames the output space
- Output format spec: JSON schema, XML tags, or exact templates — ambiguity costs tokens
- Negative examples: show what bad looks like, not just good
- Delimiters: wrap context in triple quotes or XML tags
- Decomposition: split one hard prompt into three easy ones and chain outputs
- Self-consistency: sample 5 times, take the majority to cut variance
- Prefill: start the assistant message with { or "Sure, here is" to lock format
- Self-critique pass: have the model grade its own answer, then revise
The core claim: most people write prompts, while engineers version, test, and ship them like code — a prompt is a specification, treat it like one.
More from coding & agent
- Dev interview: Pi Coding Agent, a simple toolkit for building your own coding agent — 4310sy · 2026-10-12
- Hugging Face's ML Intern turns a prompt into a trained model: 6 models in a week for ~$100 — Gradio · 2026-10-12
- VoiceStudio hits 59K stars: 10 exploding GitHub repos, from no-code to technical — PrajwalTomar_ · 2026-10-12
- yoagent: a Rust agent runtime that reuses pi extensions and DeepSeek Harness plugins — liyuanhao · 2026-10-12
- xses: a unified CLI to sync and resume AI coding agent sessions across 5 tools — Choice_Concern_5387 · 2026-10-12
- 15 role-based prompts claim to replace a $114,500 ML education, from theory to MLOps — bigaiguy · 2026-10-12