veda.ng
Module 5 of 7

5. Best Practices

Prompt Engineering Best Practices

Rules that apply to every prompt, every time

Be Specific

Include word counts, format, audience, and tone in every prompt.

Never say "write something about X"

Iterate

Treat prompting as a conversation. Refine based on each output.

Never accept first output as final

Use Delimiters

Wrap input text in triple quotes or XML tags to separate instructions from data.

Never mix instructions with input data

Set Constraints

Tell the AI what NOT to do. Anti-instructions prevent bloat and hallucination.

Never leave the output format undefined

Becoming an expert prompt engineer is an iterative process. This module consolidates the most important rules and patterns to keep in mind as you refine your skills. Think of these as the "design patterns" of prompting.

Prompt Anti-Patterns

Common mistakes and their corrections

Vague instructions
Bad: "Make it better"
Fix: "Reduce function length to under 20 lines and add error handling"
No output format
Bad: "Summarize this"
Fix: "Summarize in 3 bullet points, each under 15 words"
Context dump
Bad: Pasting 10,000 lines of code
Fix: Include only the relevant function + its interface
Multi-task prompt
Bad: "Fix the bug, add tests, and refactor"
Fix: Split into 3 separate prompts, chain the results