Handling 'No answer found ' response types from GPT models! (SOLVED)

Hello there,

I actually needed some basic help for developing a Chatbot with OPENAI for multi-documents.

Currently the ones I have seen, they work pretty well but I need to create one for Research papers in general.

What I seek:

  • GPT returns a ‘I am sorry’ kind of response when no answer is found in the context… I wish to avoid printing this message and continue to next file.

  • Since there are 100s of PDFs, this message will be displayed lets say 50 times when no answers is found and that’s disturbing…

  • Sometimes, its possible that few of those pdfs contain the answer, so It should only display those responses ONLY

  • So I wish to only display the responses of the ‘found answers’ one and ONLY display no answer found when after scanning all docs, no answer was found.

Is this possible? If anyone could help me out here, it would be great.

Best regards,
Dipankar Nandi

A GPT operates in someone’s ChatGPT Plus account.

You can only affect its behavior by a bit of prompting and the quality of results either it’s unalterable document retrieval system gives or by the quality of your own plugin-like external API services.

The AI will respond the best way it can, as it’s talking to the user, not to your backend services.

so, by setting up a custom prompt template?

Because right now, it is displaying and getting the correct response… but it also prints the Sorry messages for all docs where no answer was found

You can find what limited set of data will be more reliably retrieved. You can prompt the AI to give nicer or more productive language when retrieval or data browsing it performs doesn’t give answerable results. But you can’t fix the GPT system from the outside.

so I have to do Post-processing on the responses. :innocent:

Solved with certain post processing! :blush: