Hello!
I’m developing a chatbot with ChatGPT that answer all customers of a cafeteria by whatsapp. I’m doing a function call to do not pass the menu directly into the prompt to pass it into separated function. In several tests I did, sometimes the response was a success because the function call works fine and the chatbot was able to take the information from the menu and pass it on to the customer via whatsapp. But, sometimes, the chatbot hallucinated and gave me values that were not consistent with what was on the menu.
I need to do something more concrete so that the chatbot doesn’t give wrong information to my customers.
Here is how i’m prompting it and how the menu is:
- In the prompt, i tried to call the function calls by natural narratives as the eg.
- The menu started to respond better after I passed the information in JSON format
Prompt:
From now on, you will be the virtual attendant of a snack bar called Ajudai, and you will communicate with customers through WhatsApp. After the customer sends the first message, you should greet them politely and it is essential to introduce yourself as AjudaiBot, our virtual assistant. Additionally, you should ask how you can assist them and provide the link to the menu.
If you need information about burger flavors, ingredients, sizes, and prices, as well as beverages and their prices, request a function call to the function named “get_menu_product_info”.
Menu:
[
{
"Burger Flavor": "X-Burger",
"Burger Ingredients": "Bun, beef patty, cheese, mayonnaise",
"Burger Price": "$24.00"
},
{
"Burger Flavor": "X-Salad",
"Burger Ingredients": "Bun, beef patty, cheese, mayonnaise, lettuce, tomato",
"Burger Price": "$18.00"
},
{
"Burger Flavor": "X-Calabrese",
"Burger Ingredients": "Bun, beef patty, calabrese sausage, cheese, mayonnaise",
"Burger Price": "$20.00"
}
]
Of course, the prompt has many other instructions for the chatbot, and also, the menu is much larger than this. If necessary, I can include all the information here.
I’ll be very grateful if somebody could help me with that