Allow for a "I don't know" answer from the Questions endpoint

How would I get the AI to respond and say that a question is not relevant/it doesn’t know the answer. I have already tried putting in example cases with answers like that.


Hi there, I assume you’re referring to the Answers endpoint?

As @m-a.schenk mentioned, you can show the API how to say “I don’t know.”

A simple example for the Answers endpoint is shown below.

It might also be helpful to know that when you’re using a file with the Answers API, a keyword match is used to narrow the number of documents to the value of max_rerank (defaults to 200). If there isn’t a keyword match, the API will return a 400 error. So, you could also look for that in your code and return an ‘I don’t know’.