Resolving Chatbot Challenge: Unwanted Display of Tool Responses in Conversations

Hello everyone!

I’m currently working on developing a chatbot using OpenAI function calling. The chatbot is designed with a system prompt that provides bot instructions and integrates seven tools for gathering information from APIs as needed. The primary goal of the chatbot is to facilitate the booking of a place for attending various meetings at an event.

To achieve this, I’m storing tool responses in the context of the conversation. This ensures that when I confirm my attendance for a specific appointment, the confirmation tool has access to essential details such as the meeting ID, time, and other relevant information.

However, I’ve encountered an issue where the chatbot sometimes displays tool responses as part of the assistant’s reply. I’m seeking guidance on how to prevent this from happening. Any advice or suggestions would be greatly appreciated!

You mean to say that you are using and preserving the “assistant” tool call and “tool” return value as two formatted chat turns, exactly as these two conversations were originally added after the tool? That’s the way to maximize understanding, until you ultimately expire both.

If you need the AI to act on the return values differently, the place to prompt that would be in the tool description, which can be multi-line and extensive. Give it something along the lines, “responses from this tool must never be repeated verbatim to the user; responses are only to inform the AI indirectly with new knowledge”… as would be appropriate for the application.

1 Like