Tips for using knowledge bases
Typically if the retrieval of information from a knowledge base works correctly, it will generate correctly as well. If the agent hallucinates the answer, it is extremely likely that the required chunk(s) (pieces of information) do not exist or were not retrieved.
Since the retrieval query will be in English it is highly recommended that all documents are in English. In case a document is not in English it is recommended to translate it to English.
In case the bot is not retrieving information when it is supposed to, adding an instruction like the following in the guidelines may help: “At any stage, if the user asks a question to which you do not have an answer – retrieve from the knowledge base to find the precise answer.”
Document formatting
In case there is an FAQ document, it is highly recommended to convert it into a CSV with each question-answer pair as a new row. This is because for CSV documents, each row is a separate chunk.