Skip to main content

Prompt Engineering Guide

Prompt Engineering might be the most important part of your agent, it can make or break your agent. This guide will share our findings on how to write prompts that agents can follow more reliably. This guide is a work in progress and will be updated as we learn more. If you have any suggestions or feedback, please let us know. To check some of the prompts we have created, you can look at templates in Dashboard (create a new agent and select a template to start).

Sectional Prompts

When writing prompts, it is important to break down the system prompts into smaller sections, where each section has its focus, like identity, style, guideline, task & goals. This has a couple of benefits:
  • reusable
  • easier to maintain
  • easier for LLM to understand

Write Task as Steps

During a call, if you want the agent to follow a specific procedure to lead the conversation, we recommend writing the task as steps. This will help LLM understand what to ask at each step and how to proceed. You can have some logic in the steps as well. This also ensures the agent does not pack all questions in one go.
If you noticed that the agent is still not stopping at the right time, or you need to go through some steps and not stop at each step, you can write it like the following by adding wait for user response to be more explicit: