Open andreas-sommer-engenious opened 9 months ago
Hello Andreas, to prevent the LLMs from answering questions that are not justified by the data provided, you should specify this in the system query. This is actually already quite well described in the default of this repo, see the following snippet from chatreadretrieveread.py: "[...]Answer ONLY with the facts listed in the list of sources below. If there is not enough information, say you don't know. Do not create an answer that does not use the sources listed below. [...]" For me at least, it prevents questions that have nothing to do with the data in the index from being answered. The retrieval method (Vector, keyword, hybrid) usually has nothing to do with this.
I have created the database with several pdf documents about our products. It works fine, when I ask a question about our products. The answer is correct. But when I ask a general question "Who is the first president of the USA" f.ex. then I also get an answer. I thought to change the retrivial mode to "Vector" should solve the issue, but it doesn't work. How can I prevent that?
Regards Andreas