validating_prompt = ("You are here to validate a response..." "Return False if the response is not helping answering the question." "Question: {query}" "Response: {Bot response}" "Feedback:" ) feedback = llm.complete(validatng_prompt.format(ADD ALL THE PARAMS) Based on the feedback you can suse next condition