Hello, community!
I’m working on an assistant whose goal is to return price quotes for products requested by clients.
Here’s the process:
- The client requests the price for a product, say “Product X.”
- The assistant calls a function that searches a database for prices related to the requested product.
- The function returns “N” matches for that product, and the assistant selects the one with the lowest price.
The problem is that the assistant is returning a result from a different data source than the one provided by the function.
Example:
Client request: ALBENDAZOL SUSP 10ML VITAMEDIC
The function call returns two matches:
- ALBENDAZOL SUSP 10ML VITAMEDIC, R$1.99
- ALBENDAZOL SUSP 10ML TEUTO, R$2.23
However, the assistant’s response to the client is:
ALBENDAZOL SUSP 10ML, R$3.00
Additionally, the client may request a list of products. The assistant iterates through the list, generates a unique CALL_ID
for each product, and returns an array of tool_calls
with all the calls in a requires_action
status. I process all these calls and submit them back to the assistant.
Everything works fine in terms of processing, except for the final response given by the assistant when the run is complete.
I haven’t found any pattern for this behavior—it seems random at this point.
For reference, I’m using gpt-4o-mini-2024-07-18.
Has anyone encountered this issue or have suggestions on what might be causing this?