Use completions if no answer in file

Hi! Sorry for my English.

After many tests on completions mode, I decided to test Answers, because with the help of the chat people, I realized that I would give more accurate answers to what I’m trying to create, with no chance of unrealistic answers, for example, answering that I provide a certain service that actually I do not pay or invent incorrect features of a product.

However in the answers, if the person asks a question that is not in the file, the system will return an error “No similar documents were found in the file with ID XXX”.

So my question:
Is there a way that, if there is nothing similar, the AI can send an improvised response based on the learning database, like in Completions?

Well, I went ahead and programmed something to do that.
As the answers leaves an error message, I created at the programming level (in PHP) an IF. So, in case the answers fails to answer and returns an error, I call Completions which responds based on a prompt where I summarized the information that will be in the File, letting her improvise a little.
But, as this is completions and there is a risk of incorrect response, these responses are accompanied by an alert icon, which means that the response may be inaccurate or incorrect.

I still don’t know if this is allowed in OpenAI at the production level, but it’s the solution I found at the moment.

completions

1 Like