Hi! I have an assistant that is a chatbot taking orders from a pastries shop. It has one file attached with the list of products, descriptions, id, prices, etc. It looks something like this:
[
{
"ID":"dae96fc0",
"Name":"Carrot cake",
"Description":"homemade carrot cake"
},
{
"ID":"b48277d9",
"Name":"Banana cake",
"Description":"made with very fresh bananas"
},
{
"ID":"9fcfbd5f",
"Name":"Strawberry cake",
"Description":"small cake that comes with toppings"
}
]
And I have a function (tool) that, when the assistant receives an order from the customer, e.g. “I want 2 carrot cakes and 1 strawberry cake”, the function returns the ID
and Name
of each product.
With this ID
I then call my own backend to process the order with all the selected products.
It works well most of the times, however, sometimes the model hallucinates the IDs. Instead of, for example, returning:
"ID":"b48277d9",
"Name":"Banana cake"
It returns
"ID":"c8b253f8b290bab0ae1a56e6a",
"Name":"Banana cake"
a completely made up ID. So then my backend fails to find a product with that ID.
Have you had this issue? Also, do you have any workaround for not depending on the ID
of items when parsing data that needs to match a database?