General 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 a large prompt like general prompt, it is good practice to break 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
For Complex Tasks: use Conversation Flow
When the prompt logic gets complicated, and / or a lot of tools are involved, it’s quite easy for LLM to make a wrong decision. Therefore, breaking it down to multiple nodes is pretty intuitive.
For Single / Multi Prompt Agent: Explicitly Write When to Call Tools
A lot of time LLM does not have a clue when to call the tools with a description of what the tool does. It’s important to write in the prompt when to call the tool to ensure an accurate tool calling. Make sure to refer to the tool by its name.
Was this page helpful?