Prompt Engineering
Prompt engineering is writing the instructions you give an AI model so it returns the answer you need, in the format you need, every time.
Prompt engineering is the work of writing instructions for an AI model so it does the job you meant, the same way every time.
Example
A workflow scores new sales leads. If the prompt just says "Is this a good lead?", the model answers in a different shape every run. Sometimes a paragraph, sometimes "yes", sometimes a list.
A better prompt says what makes a lead good for this business. It asks for a score from 1 to 10 and says what each range means. It says what to do when the company name is missing. And it asks for the answer as JSON with two fields, a score and a reason. Now the next step in the workflow can read the answer.
Why it matters in automation
In a chat, you can fix a bad answer by asking again. In an automation, the same prompt runs thousands of times with nobody watching. A vague prompt gives a slightly different answer each time, and the step after it breaks.
That's why the prompt has to spell out the scoring rules, the output format, the odd cases and the scale.
Common techniques
- Zero-shot: give the instruction with no examples and rely on what the model already knows.
- Few-shot: include a few example inputs and the outputs you want, so the model copies the pattern.
- Chain of thought: ask the model to work through the problem step by step before answering. This helps on harder tasks.
- System prompt: a standing instruction that sets the model's role and rules for the whole conversation.
- Temperature: a setting for how random the output is. Lower means more predictable.
- Structured output: asking for a fixed format, like JSON, so the next step in the workflow can read it.
You'll use these when setting up AI steps in tools like n8n or Make.
Related terms
- Large Language Model: the models your prompts are written for
- AI Automation: workflows whose AI steps depend on good prompts
- Agentic AI: AI agents whose behavior is shaped by their prompts
- n8n: an automation tool where you write prompts inside AI nodes