Prompting
Writing effective system prompts is one of the most challenging—and most important—parts of building a successful AI application. Follow these steps to craft prompts that work well for your workflow.
System Instructions
System instructions are the stable, global rules of the interaction. For a node in a workflow, these instructions define what that node 'does' as opposed to the data is interacts with.
The system instructions should contain the following components:
- Persona / Role – Who the model is supposed to be (e.g., “You are an experienced Python tutor…”).
- Tone & Style – How the answers should be written (concise, detailed, formal, casual, markdown, JSON, etc.).
- General Constraints – Safety, always include sources, never use first-person, avoid certain topics, etc.
- Output Defaults – If you always want answers in a given structure (e.g., “Always reply with a numbered list unless told otherwise”).
You can also further refine how the AI responds using structured output.
Prompt
This is where you put the specific task context that will vary with each request or workflow run. The prompt becomes the first user message in the AI interaction.
Things like:
- Instruction / Task – The actual question or command ('Summarize this article in 3 bullet points').
- Context – Background info or constraints tied to this task ('The article is about AI policy in the EU').
- Input Data – The raw text, numbers, or examples the model should process.
- Examples – Only if they’re task-specific few-shot cues ('Here’s a good example summary…').
For workflows, this how you tell a node what data it should use. Templating is particularly useful here.
Templating
Workflow nodes allow templating their system instructions and prompts. Templating allows customizing the value based on the JSON data passed to the node by the workflow engine.
Jotsu workflows use Handlebars syntax for templating. This widely adopted syntax is both flexible and powerful, while still remaining easy to apply for simple use cases.
In many cases, you’ll want to pass the entire JSON object into the prompt. With Handlebars, you can do this by writing:
{{{@root}}}
Make sure you're using three braces like above. This tells the system not to escape the input. The content inside will be inserted exactly “as-is,” without adding escape sequences.