From vague one-liner to production-ready triage prompt: 5 practical LLM techniques
Pristine_Post6875 · reddit · 2026-11-15
The author walks through systematically improving a genuinely bad customer-support email triage prompt across 5 steps, validated against 8 tricky edge cases (multi-issue emails, sarcasm, prompt injection):
- Structure the prompt: clear role, task definition, and output instructions instead of a vague one-liner
- Few-shot examples: demonstrate complex edge cases, keeping test data strictly separated
- Structured outputs (JSON Schema): enforce programmatic contracts with strict enum mapping
- Reasoning & step-by-step thinking: evaluate reasoning effort's impact; not a universal shortcut across architectures
- Prompt injection defense: treat external emails as untrusted input, wrap in XML delimiters, add system guardrails, and validate actions like refunds outside the model
Code and sample prompts are open-sourced at AI-Literacy-Lab/promptengineering, with a full walkthrough video.
More from coding & agent
- Google's 19K-star EGM plugin reviews AI code specs with deliberate 'goldfish memory' — techNmak · 2026-11-15
- shadcn/ui creator ships /improve skill: expensive model plans, cheap model codes — nikola_mr64990 · 2026-11-15
- Aptly: local MCP server recommends subagent models via OpenAI Decisions API — CH_CGV · 2026-11-15
- Are we using AI agents wrong? Reddit debates delegation vs chatbot use — Party-Breakfast-3606 · 2026-11-15
- Insurance researcher pushes back: coding AI can't yet replace whole programmer teams — davidmanheim · 2026-11-15
- 27 AI agents rebuild a paid app in 3 hours and catch a dangerous Windows file-deletion bug — nikola_mr64990 · 2026-11-15