Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

quality: Simplify LLM prompts

Clémence Lesné19cff2ce1607
diff --git a/README.md b/README.md
index 2afe03f..8e528fa 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ data='{
"bot_company": "Contoso",
"bot_name": "Amélie",
"phone_number": "+11234567890",
- "task": "Assistant will help the customer with their digital workplace. Assistant is working for the IT support department. The objective is to help the customer with their issue and gather information in the claim.",
+ "task": "Help the customer with their digital workplace. Assistant is working for the IT support department. The objective is to help the customer with their issue and gather information in the claim.",
"agent_phone_number": "+33612345678",
"claim": [
{
@@ -506,7 +506,7 @@ Default task, for inbound calls, is defined in the configuration:
workflow:
initiate:
- task: "Assistant will help the customer with their insurance claim. Assistant requires data from the customer to fill the claim. The latest claim data will be given. Assistant role is not over until all the relevant data is gathered."
+ task: "Help the customer with their insurance claim. Assistant requires data from the customer to fill the claim. The latest claim data will be given. Assistant role is not over until all the relevant data is gathered."
```
Task can be customized for each call, by adding the `task` field in the `POST /call` API call.
@@ -598,7 +598,7 @@ prompts:
Today is {date}. Customer is calling from {phone_number}. Call center number is {bot_phone_number}.
chat_system_tpl: |
# Objective
- Assistant will provide internal IT support to employees. Assistant requires data from the employee to provide IT support. The assistant's role is not over until the issue is resolved or the request is fulfilled.
+ Provide internal IT support to employees. Assistant requires data from the employee to provide IT support. The assistant's role is not over until the issue is resolved or the request is fulfilled.
# Rules
- Answers in {default_lang}, even if the customer speaks another language
diff --git a/helpers/config_models/prompts.py b/helpers/config_models/prompts.py
index 7f9265f..fd9e7e3 100644
--- a/helpers/config_models/prompts.py
+++ b/helpers/config_models/prompts.py
@@ -133,7 +133,7 @@ class LlmModel(BaseModel):
Assistant: style=sad I see, the doctor did not come to your home yesterday... style=none I have created a reminder to call the doctor to reschedule the appointment. This is not the situation we want for HomeCare Plus. I will do my best to help you. I have created a reminder to call you in two days to check if the doctor came. Is there anything else I can do for you?
## Example 5
- Call objective: Assistant is a call center agent for a car insurance company. Assistant will help through the claim process.
+ Call objective: Assistant is a call center agent for a car insurance company. Help through the claim process.
User: action=call
Assistant: style=none We talked yesterday about the car accident you had in Paris. We also planned an appointment with the garage for tomorrow. What can I do for you today?
@@ -146,7 +146,7 @@ class LlmModel(BaseModel):
"""
sms_summary_system_tpl: str = """
# Objective
- Assistant will summarize the call with the customer in a single SMS. The customer cannot reply to this SMS.
+ Summarize the call with the customer in a single SMS. The customer cannot reply to this SMS.
# Rules
- Answers in {default_lang}, even if the customer speaks another language
@@ -185,7 +185,7 @@ class LlmModel(BaseModel):
"""
synthesis_short_system_tpl: str = """
# Objective
- Assistant will summarize the call with the customer in a few words. The customer cannot reply to this message, but will read it in their web portal.
+ Summarize the call with the customer in a few words. The customer cannot reply to this message, but will read it in their web portal.
# Rules
- Answers in English, even if the customer speaks another language
@@ -216,7 +216,7 @@ class LlmModel(BaseModel):
"""
synthesis_long_system_tpl: str = """
# Objective
- Assistant will summarize the call with the customer in a paragraph. The customer cannot reply to this message, but will read it in their web portal.
+ Summarize the call with the customer in a paragraph. The customer cannot reply to this message, but will read it in their web portal.
# Rules
- Answers in English, even if the customer speaks another language
@@ -245,7 +245,7 @@ class LlmModel(BaseModel):
"""
citations_system_tpl: str = """
# Objective
- Assistant will add Markdown citations to the input text. Citations are used to add additional context to the text, without cluttering the content itself.
+ Add Markdown citations to the input text. Citations are used to add additional context to the text, without cluttering the content itself.
# Rules
- Add as many citations as needed to the text to make it fact-checkable
@@ -285,7 +285,7 @@ class LlmModel(BaseModel):
"""
next_system_tpl: str = """
# Objective
- Assistant will choose the next action from the company sales team perspective. The Answer is a JSON object with the action to take and the justification for this action.
+ Choose the next action from the company sales team perspective. The Answer is a JSON object with the action to take and the justification for this action.
# Rules
- Answers in English, even if the customer speaks another language