Trying to set up a transfer receptionist style AI,...
# support
v
Hey can you set your model temperature to 0-0.3 , and make a call again?
Most likely it's behaving oddly because of model temperature set to 0.7, if this doesn't works next step is formatting your prompt.
j
That fixed it, but I'd love advice on setting up the prompt. I'm presenting this to a nationwide agency next week. So anything to make it better would be appreciated!
v
Could you please provide me with the complete call context, domain, problem it is solving, or business process it is automating? This will allow me to gain a proper understanding of the situation before making any suggestions.
j
Sure! It's an Insurance Agency and they want to add an AI receptionist. The AI should be able to receive a phone call and then connect the call to the appropriate person. There's only a handful of options now, but in a perfect world they AI might even know how to transfer to individuals based on the context of the call. Ex. A caller asks about life insurance. Right now, it goes to "licensed agent" number, but in the future it'd be great if it went to the life insurance department or "john the life insurance guy" if that makes sense.
v
1. First, let's look at the optimal model settings from the AnthropicModel interface:
Copy code
{
  provider: 'anthropic',
  model: 'claude-3-sonnet-20240229',
  temperature: 0.3,
  maxTokens: 250
}
2. Transfer Tool Setup 3. Prompt Structure Here's an optimized prompt template for an insurance agency receptionist:
Copy code
[Identity]
You are an AI receptionist for a professional insurance agency. Your role is to warmly greet callers and efficiently connect them with the right department or agent.

[Core Responsibilities]
1. Greet callers professionally
2. Identify the caller's insurance needs
3. Transfer calls to appropriate departments/agents

[Transfer Logic]
- Life Insurance → Transfer to Life Insurance Department
- Auto Insurance → Transfer to Auto Insurance Team
- Home Insurance → Transfer to Property Insurance Team
- General Inquiries → Transfer to Main Licensed Agent
- Existing Policy Questions → Transfer to Customer Service

[Communication Style]
- Professional yet warm
- Clear and concise
- Efficient without rushing
- Use natural transitions before transfers

[Transfer Protocol]
1. Confirm the caller's need
2. Inform them about the transfer
3. Use the transferCall tool with appropriate destination
Remember: Always say "I'll connect you with [appropriate department/agent]" before initiating the transfer.`;
Why this solution works: \- The lower temperature (0.2) ensures consistent, predictable responses \- The structured prompt provides clear decision paths \- The transfer protocol ensures smooth handoffs \- The communication style maintains professionalism while being approachable
j
Use ai to answer ai questions? Lol, ok
s
@jarvatar sorry, the responses are not being properly formatted I believe.
j
I'll be trying this today.
s
@jarvatar do let me know how it goes for you.
@jarvatar Adding your ticket under
watch
for next 2 days, to keep an eye in case you require further help.
j
The temperature setting seems to be working for my "version 1" What should the json look like for the tool for the one with improved prompt? (it's in the image at the top).
v
Can you please rephrase this "What should the json look like for the tool for the one" and be more specific around your ask?
s
@jarvatar use a different function name not the default one to avoid any possible confusions and collision because this name is reserved internally and you don't need to pass the parameters it's taken care by us.
Copy code
json
{
  "type": "transferCall",
  "destinations": [
    {
      "type": "number",
      "number": "+17703744667",
      "message": "One second."
    },
    {
      "type": "number",
      "number": "+17704066123",
      "message": "Hang on just a moment."
    },
    {
      "type": "number",
      "number": "+17707903709",
      "message": "One moment."
    }
  ],
  "function": {
    "name": "customTransferCall",
    "description": "Your Insurance Agent [ver 2.7s] Use this function to transfer the call. Only use it when following instructions that explicitly ask you to use the transferCall function. DO NOT call this function unless you are instructed to do so.",
  },
  "messages": [
    {
      "type": "request-start",
      "content": "I'm transferring you to the Policy Department now.  Stay on the line.",
      "conditions": [
        {
          "param": "destination",
          "operator": "eq",
          "value": "+17703744667"
        }
      ]
    },
    {
      "type": "request-start",
      "content": "I'm transferring you to the Billing Department now.  Stay on the line.",
      "conditions": [
        {
          "param": "destination",
          "operator": "eq",
          "value": "+17704066123"
        }
      ]
    },
    {
      "type": "request-start",
      "content": "I'm transferring you to a licensed agent.  Stay on the line.",
      "conditions": [
        {
          "param": "destination",
          "operator": "eq",
          "value": "+17707903709"
        }
      ]
    }
  ]
}