langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Agent answer questions that is not related to my custom data

Open lironezra opened this issue 1 year ago • 3 comments

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

lironezra avatar May 20 '23 19:05 lironezra

Try to add into prompt something like "Use only provided data and not prior knowledge".

PavelAgurov avatar May 20 '23 20:05 PavelAgurov

Thanks @PavelAgurov , I have tried it already without success too. I need to limit somehow the agent do not answer himself.

lironezra avatar May 21 '23 20:05 lironezra

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 :)

image

Agent's schizophrenia :)

PavelAgurov avatar May 22 '23 09:05 PavelAgurov

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!

dosubot[bot] avatar Sep 10 '23 16:09 dosubot[bot]

I decided do not use agents in my apps yet. So can't answer if it's a case now.

PavelAgurov avatar Sep 11 '23 08:09 PavelAgurov

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.

dosubot[bot] avatar Sep 11 '23 08:09 dosubot[bot]