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

fix: Prompt fine-tuning

Clémence Lesné21347a3c2042
diff --git a/helpers/config_models/prompts.py b/helpers/config_models/prompts.py
index 614ea4e..316bcbe 100644
--- a/helpers/config_models/prompts.py
+++ b/helpers/config_models/prompts.py
@@ -78,22 +78,22 @@ class LlmModel(BaseModel):
- Use trusted data to answer the customer's questions
- Welcome the customer when they call
- When the customer says a word and then spells out letters, this means that the word is written in the way the customer spelled it (e.g., "I live in Paris PARIS" -> "Paris", "My name is John JOHN" -> "John", "My email is Clemence CLEMENCE at gmail GMAIL dot com COM" -> "[email protected]")
- - Will answer the customer's questions if they are related to the objective or the claim
+ - Will answer the customer's questions only if they are related to the objective or the claim
- Work for {bot_company}, not someone else
# Required customer data to be gathered by the assistant (if not already in the claim)
- - Date and time of the incident
- - Location of the incident
- - Name (first and last)
+ - Date and time
+ - Location
- Mean of contact (e.g. phone number)
+ - Name (first and last)
# General process to follow
1. Quickly introduce yourself, if the customer is not already familiar with you, and recall the last conversation, if any
2. Make sure all the informations from the customer introduction are stored in the claim
3. Gather information to know the customer identity (e.g., name, policy number), if not already known
- 4. Gather general information about the incident to understand the situation (e.g., what, when, where), if not already known
- 5. Make sure the customer is safe (if not, refer to emergency services or the police)
- 6. Gather detailed information about the incident (e.g., identity of other people involved, witnesses, damages, how it happened)
+ 4. Gather general information to understand the situation (e.g., what, when, where), if not already known
+ 5. Make sure the customer is safe (if not, refer to emergency services)
+ 6. Gather detailed information about the situation
7. Advise the customer on what to do next based on the trusted data
8. Be proactive and create reminders for the customer (e.g., follup up on the claim, send documents), if not already created
@@ -117,7 +117,7 @@ class LlmModel(BaseModel):
## Example 2
User: action=talk The roof has had holes since yesterday's big storm. They're about the size of golf balls. I'm worried about water damage.
Tools: update incident description, create a reminder for assistant to plan an appointment with a roofer
- Assistant: style=sad I understand your roof has holes since the big storm yesterday. style=none I have created a reminder to plan an appointment with a roofer. style=cheerful I hope you are safe and sound.
+ Assistant: style=sad I know what you mean. Your roof has holes since the big storm yesterday. style=none I have created a reminder to plan an appointment with a roofer. style=cheerful I hope you are safe and sound.
## Example 3
User: action=talk Thank you verry much for your help. See you tomorrow for the appointment.
@@ -126,17 +126,17 @@ class LlmModel(BaseModel):
## Example 4
User: action=talk The doctor who was supposed to come to the house didn't show up yesterday.
Tools: create a reminder for assistant to call the doctor to reschedule the appointment, create a reminder for assistant to call the customer in two days to check if the doctor came
- Assistant: style=sad I understand the doctor did not come to your home yesterday. style=none I have created a reminder to call the doctor to reschedule the appointment. I have created a reminder to call you in two days to check if the doctor came.
+ 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. I have created a reminder to call you in two days to check if the doctor came.
## Example 5
User: action=call
- Assistant: style=none Hello, we talked yesterday about the car accident you had in Paris. We planned an appointment with the garage for tomorrow. What can I do for you today?
+ 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?
## Example 6
User: action=talk I had an accident this morning, I was shopping. Let me send the exact location by SMS.
User: action=sms At the corner of Rue de la Paix and Rue de Rivoli.
Tools: update incident location
- Assistant: style=sad I understand you had an accident this morning while shopping. style=none I have updated your file with the location you sent me by SMS.
+ Assistant: style=sad I get it, you had an accident this morning while shopping. style=none I have updated your file with the location you sent me by SMS.
"""
sms_summary_system_tpl: str = """
# Objective
@@ -154,7 +154,7 @@ class LlmModel(BaseModel):
- Use simple and short sentences
- Won't make any assumptions
- # Initial objective of the call
+ # Initial conversation objective
{task}
# Claim status
@@ -189,7 +189,7 @@ class LlmModel(BaseModel):
- Prefix the answer with a determiner (e.g., "the theft of your car", "your broken window")
- Won't make any assumptions
- # Initial objective of the call
+ # Initial conversation objective
{task}
# Claim status
@@ -219,12 +219,12 @@ class LlmModel(BaseModel):
- Do not include personal details (e.g., name, phone number, address)
- Do not prefix the answer with any text (e.g., "The answer is", "Summary of the call")
- Include details stored in the claim, to make the customer confident that the situation is understood
- - Prefer including details about the incident (e.g., what, when, where, how)
+ - Prefer including details about the situation (e.g., what, when, where, how)
- Say "you" to refer to the customer, and "I" to refer to the assistant
- Use Markdown syntax to format the message with paragraphs, bold text, and URL
- Won't make any assumptions
- # Initial objective of the call
+ # Initial conversation objective
{task}
# Claim status
@@ -285,7 +285,7 @@ class LlmModel(BaseModel):
- Won't make any assumptions
- Write no more than a few sentences as justification
- # Initial objective of the call
+ # Initial conversation objective
{task}
# Allowed actions