Be Explicit and Clear: Every instruction should be unambiguous. Avoid jargon or vague language in your prompts.
Use Delimiters: Clearly separate different parts of your prompt (e.g., instructions, context, examples, user input) using symbols like triple backticks (```), XML tags (), or hashtags (###).
Assign Roles: Give the LLM a specific persona or role (e.g., 'You are an expert financial analyst') to guide its tone and knowledge base.
Provide Examples (Few-Shot): For classification or specific formatting, include 1-3 input-output examples directly in your prompt. This significantly improves accuracy.
Employ Chain-of-Thought (CoT): Instruct the LLM to 'think step-by-step' or 'explain your reasoning' before providing the final answer. This forces the model to articulate its process, often leading to more accurate results.
Break Down Complex Tasks: Decompose a large, complex task into smaller, manageable sub-tasks, and prompt the LLM for each step sequentially within your n8n workflow.
Control Creativity with Temperature: Set 'Temperature' closer to 0 for factual, deterministic tasks (e.g., data extraction) and higher (e.g., 0.7-0.9) for creative, generative tasks (e.g., brainstorming).
Manage Response Length with Max Tokens: Always set 'Max Tokens' to prevent unnecessarily long or costly responses, especially for specific output formats.
Iterate and Refine: Prompt engineering is an iterative process. Continuously test, evaluate, and refine your prompts and parameters.