Hi Vikas - normally if it is a generic question and if its not in the documents, and if the LLM can answer that it will answer (if its already pretrained on that topic). If its totally a random topic and if its not something the LLM cannot answer, then I have seen ot halusinate. Not sure if there is a way to detect the answer and handle the exception/error. You can think of mutli agent applicaiton which uses a different LLM to validate the response to ensure that it is correct. If you have to integrate with Web and search the web, u can use a langchain agent and integrate that