The community member is building a chatbot and is facing issues where the chatbot cannot provide the exact answers even though the data contains the relevant information. They are using a smaller language model (GPT-4o-mini) and are considering using a larger one (GPT-4o) to improve the performance. The community members discuss ways to control and validate the correctness of the chatbot's responses, especially for legal matters where accuracy is crucial. They suggest techniques like validating the response against a prompt containing the required conditions, and updating the context or index to improve the chatbot's understanding for future queries. However, there is no explicitly marked answer in the comments.
Hello @All. How can I get the exact answer from the document? After a period of use, I found that many questions the chatbot cannot answer even though the data contains information and there are some cases where the chatbot cannot answer similar questions. How to optimize the chatbot.
I am using gpt-4o-mini. gpt-4o would be better, but I still encounter issues sometimes. It's just that the frequency is lower. However, I also have a question: can I control the answers?
Exactly. I want to control whether the answers are correct or not. Since I’m building a chatbot related to legal matters, there can be no errors because all the data is already in the documents
Let me ask what is the comparison mechanism here. If it is based on the returned nodes for comparison, then it will most likely rotate correctly. But what if the node is wrong?
No the comparison would not be with the nodes here, You can add the user query + returned response + your prompt containing the instructions on which the response will be evaluated. The evaluation will be done by the LLM following the instructions.
You can sort of update the context of the previous node if the earlier info was incorrect. Or else you could add this correct info to the index. That way the bot would pick the answer correctly next time