Improving quality of search filters in Discourse AI

I see. That makes sense. From OpenAI’s docs on function calling:

The basic sequence of steps for function calling is as follows:
1. Call the model with the user query and a set of functions defined in the functions parameter.
2. The model can choose to call one or more functions; if so, the content will be a stringified JSON object adhering to your custom schema (note: the model may hallucinate parameters).
3. Parse the string into JSON in your code, and call your function with the provided arguments if they exist.
4. Call the model again by appending the function response as a new message, and let the model summarize the results back to the user.

Critically, I wasn’t aware of #4. I didn’t realize that the results of invoking the tool were appended as messages. I thought it was entirely up to the client if the results were used in subsequent calls! So I was confused when I didn’t see tool call results in the prompt itself. :facepalm: This all makes a lot more sense now. Thank you!

:+1: :pray: Sounds like the only downside here is that bot replies won’t include those nice search results. Would you strongly recommend using doc uploads and the search tool for any reason, even though it will be a bit redundant? I wonder if the benefits of getting the search results in the convo will be worth it.