Step 1: Creating a Prompt
Creating a Prompt Within Your Agent
The single prompt approach allows you to define your agent’s behavior with one comprehensive prompt.It’s straightforward and great for simple use cases.
How to Write a Single Prompt
Good prompt writing is the most important part of building your agent—it can make your agent work great or not so much.This guide shows you what we’ve learned about writing prompts that agents can follow better and more consistently.
Note: This guide is updated regularly as we learn new things. If you have ideas or feedback, please share them with us.To see examples of good prompts, check out the templates in your Dashboard by creating a new agent and selecting a template.
Breaking Prompts into Sections
When writing prompts, it’s best to break them into smaller sections.This makes them easier for you to edit and easier for the LLM to understand.
Tasks
When writing your prompt you’ll want to write your tasks, or what you want the agent to ask or do, in number order like you would steps. This helps the agent space stuff out and not ask everything in one long question.Prompting More In-depth
It’s recommended to include a prompt as a guideline for the LLM to follow. This ensures that the agent can consistently reply with the correct format. When writing prompts you may have to spell things out for the agent to get the best results. Example:Appointment or Demo Booking Request Handling
If a customer requests to book an appointment or demo, follow these steps:- Ask for full name.
- Ask for preferred date and time.
- Invoke
check_available_appointments
and return available slots. - Ask for company name.
- Ask for full email address:
- If spelled out:
n-a-m-e-@-dot-com
→ interpret asname@domain.com
. - “name at” → interpret as
name@
- “dot com” → interpret as
.com
- If spelled out:
- Ask for purpose of the appointment.
- Ask for best phone number:
- Accepted formats:
4158923245
,(415) 892-3245
,415-892-3245
- Pronounce as:
"four one five - eight nine two - three two four five"
- Important: Keep spaces around the dash when speaking
- Accepted formats:
- Reconfirm preferred date and time if needed.
- Confirm all details (name, purpose, date, time, email address, phone) with the caller.
- Invoke
book_appointment
function.
Tip: If the agent says a phrase or phone number too quickly, instruct it to repeat slowly.