Skip to content

Commit

Permalink
fix: Fine-tune AI search
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlesne committed Feb 5, 2024
1 parent ef4386d commit b7eb26a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion helpers/config_models/ai_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class AiSearchModel(BaseSettings):
endpoint: str
index: str
semantic_configuration: str
top_k: int = 5
top_k: int = 10
6 changes: 3 additions & 3 deletions helpers/config_models/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -419,7 +419,7 @@ def _return(
f"""
{dedent(prompt_tpl.format(**kwargs)).strip()}
Additional context:
Trusted data you can use:
{_pydantic_to_str(trainings)}
"""
).strip()
Expand Down

0 comments on commit b7eb26a

Please sign in to comment.