Prompt patterns I actually reuse
The CodingApp.online Desk · August 4, 2026 · 1 min read · 3 views
Prompt patterns I actually reuse
Most prompt advice is folklore. These three survive contact with production.
1. The "rubric first" pattern
RUBRIC = """
Score 1-5 on: correctness, clarity, completeness.
Respond ONLY with JSON: {"scores": [...], "reason": "..."}
"""
def grade(answer: str) -> dict:
# judge != generator: use a separate call for scoring
return llm.chat([
{"role": "system", "content": RUBRIC},
{"role": "user", "content": answer},
], json_mode=True)
2. Few-shot with negative examples
Showing the model what NOT to do cuts hallucination more than extra positives.
3. Make the model spend tokens

Chain-of-verification beats chain-of-thought for factual work.
Draft, then ask it to attack its own draft, then revise.