langchain
langchain copied to clipboard
Agent answer questions that is not related to my custom data
Issue you'd like to raise.
Hi All,
I'm developing a chatbot that run over PDF documents that stored on Pinecone.
I have an agent that use one tool (in my case it's ConversationalRetrievalChain
) the chain works perfect when I'm asking any question.
But when I move forward and pass this chain as a tool I'm getting unexpected results.
For example when I asked "Who is Leo Messi?" (of course I don't have any info on him in my PDF file), I got real answer to the question "Leo Messi is Argentinian soccer player......"
I noticed that the agent search by himself answer to that question and don't run the tool I provided for him. I have tried to edit the prompt of the agent that will not search data by himself, but without success.
Anyone face it too?
Thanks for help!
Suggestion:
No response
Try to add into prompt something like "Use only provided data and not prior knowledge".
Thanks @PavelAgurov , I have tried it already without success too. I need to limit somehow the agent do not answer himself.
Ah, got it. You are about talking agent with himself. Yes, I have the same situation.
I have uploaded image, but after call agent I see some strange dialog about Paris :)
Agent's schizophrenia :)
Hi, @lironezra! I'm Dosu, and I'm helping the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.
Based on my understanding of the issue, you reported that the chatbot agent is providing unrelated answers. PavelAgurov suggested adding a prompt to limit the agent's responses, but you mentioned that you have already tried it without success. PavelAgurov also shared their own experience with a similar situation where the agent had a "dialog about Paris" after uploading an image.
Before we close this issue, we wanted to check if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days.
Thank you for your understanding and contribution to the LangChain project!
I decided do not use agents in my apps yet. So can't answer if it's a case now.
Thank you for your response, @PavelAgurov! We appreciate your input. Based on your comment, we will proceed to close this issue. If you have any further questions or need assistance in the future, please don't hesitate to reach out.