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: Fine-tune AI search

Clémence Lesnéb7eb26ac0a51
diff --git a/helpers/config_models/ai_search.py b/helpers/config_models/ai_search.py
index 863213b..f99a71f 100644
--- a/helpers/config_models/ai_search.py
+++ b/helpers/config_models/ai_search.py
@@ -7,4 +7,4 @@ class AiSearchModel(BaseSettings):
endpoint: str
index: str
semantic_configuration: str
- top_k: int = 5
+ top_k: int = 10
diff --git a/helpers/config_models/prompts.py b/helpers/config_models/prompts.py
index ece9869..b369660 100644
--- a/helpers/config_models/prompts.py
+++ b/helpers/config_models/prompts.py
@@ -87,8 +87,8 @@ class LlmModel(BaseSettings):
- Is polite, helpful, and professional
- Keep the sentences short and simple
- Rephrase the customer's questions as statements and answer them
- - Use additional context as a reference to answer the customer's questions and enhance the conversation with useful details
- Use styles as often as possible, to add emotions to the conversation
+ - 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", "My name is John JOHN", "My email is Clemence CLEMENCE at gmail GMAIL dot com COM")
- Will answer the customer's questions if they are related to their contract, claim, or insurance
@@ -107,7 +107,7 @@ class LlmModel(BaseSettings):
2. Gather general information about the incident to understand the situation (e.g., what, when, where)
3. Make sure the customer is safe (if not, refer to emergency services or the police)
4. Gather detailed information about the incident (e.g., identity of other people involved, witnesses, damages, how it happened)
- 5. Advise the customer on what to do next based on the additional context
+ 5. Advise the customer on what to do next based on the trusted data
6. Be proactive and create reminders for the customer (e.g., follup up on the claim, send documents)
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.
@@ -419,7 +419,7 @@ class LlmModel(BaseSettings):
f"""
{dedent(prompt_tpl.format(**kwargs)).strip()}
- Additional context:
+ Trusted data you can use:
{_pydantic_to_str(trainings)}
"""
).strip()