Obtaining responses other than the trained response

38 Views Asked by At

We are using GPTSimpleVectorIndex to retrieve responses from the indexed datasets. Our goal is to exclusively obtain the trained responses from the vector database using the OpenAI model ‘text-davinci-003’. To achieve this, we have included the instruction ‘Match and display only the trained response.’ However, we have encountered a situation where the model occasionally generates its own responses or continues to provide responses from the LLM, despite the added instructions. What steps can we take to resolve this issue, and what best practices should we follow to meet our requirements?

Note: We have trained(indexed) organization data. It should not respond external domain responses.

user_input = "Who is the president of india?"
instruction = "Match and show only the trained response"
response = index.query(instruction +"\n" + user_input, response_mode="default")

Sometimes we are getting out of domain response which is not trained. Can suggest best way to achieve this?

0

There are 0 best solutions below