Prompt Engineering is the art of formulating requests to an LLM to get the most accurate and useful result. The right prompt can dramatically change output quality without changing the model.
Key techniques
Zero-shot — a direct question with no examples
Few-shot — provide several "question → answer" examples before the main request
Chain-of-Thought — ask the model to reason step by step: "explain your thinking"
System prompt — set a role and context up front: "You are a senior PHP developer"
Temperature — 0 for deterministic tasks (code, facts); higher for creative ones
Effective prompt structure
Role: "You are a technical writer"
Context: "The audience is junior developers"
Task: "Explain X"
Format: "Answer in 3 paragraphs with a code example"