Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Differences among Conversational Retrieval QA to Conversational Retrieval Agent #2395

Open
niztal opened this issue May 12, 2024 · 13 comments
Labels
question Further information is requested

Comments

@niztal
Copy link
Contributor

niztal commented May 12, 2024

Describe the bug
I'm having a chatflow based on Conversational Retrieval QA, OpenAI and Pinecone as vector store. The flows works smoothly as I expect. Later on, I wanted to add a custom tool to that flow so I needed to convert it to a chatflow based on Conversational Retrieval Agent (See screenshots below) and Retrieval Tool. When hitting the same question, the results were totally different conceptually.

I want to emphasize that the OpenAI temperature and all other parameters were the same in both flows

To Reproduce
Steps to reproduce the behavior:

  1. Build chatflow1
  2. Build chatflow2
  3. Upsert the same data on both chatflows
  4. Hit a question which triggers a retrieval from vector store (pinecone)
  5. Watch differences

Expected behavior
The same results (conceptually) should be the same on both flows.

Screenshots

chat flow 1 (good)
image
image

VS.
chat flow 2 (not good)
image
image

Let me know what I miss and how to fix it. By the end of the road all I want is chatflow1 + tool.

@HenryHengZJ please help

Thanks

@toi500
Copy link

toi500 commented May 13, 2024

I see two issues:

  1. Outdated Node: Your Flow 2 is using an outdated node.
  2. Different Default Messages: The Conversational Retrieval QA and the new Conversational Agent use very different default system messages.

FLow 1

image

Flow 2 (rare default message - considering this node can be used for gemini, mistral, and others)

image

--
However, I understand your point. The new conversational agent doesn't work as I'd like either.

Let's ask to @HenryHengZJ if it's a misconfiguration or just a limitation.

@niztal
Copy link
Contributor Author

niztal commented May 13, 2024

I see two issues:

  1. Outdated Node: Your Flow 2 is using an outdated node.
  2. Different Default Messages: The Conversational Retrieval QA and the new Conversational Agent use very different default system messages.

FLow 1

image ## Flow 2 (rare default message - considering this node can be used for gemini, mistral, and others) image -- However, I understand your point. The new conversational agent doesn't work as I'd like either.

Let's ask to @HenryHengZJ if it's a misconfiguration or just a limitation.

@toi500 thanks for your reply

  1. I was using an outdated node of conventional retrieval agent since I didn't see updated version although I'm using the latest version of flowise. Let me know if I miss anything
  2. Either way, I don't think that would solve the issue
  3. I was deep diving and I think I know the root cause. The difference is that on the conventional retrieval QA's the query to open ai contains the system message + the data retrived from pinecone. Where on the convertional agent it doesn't contain the system message that's why open ai returns an output very similar to its input.

I believe that's a major bug on the conventional agent

@HenryHengZJ let me know if we miss anything and if there's any workaround to resolve this, or in general if there's any other way we can use the conversational retrieval QA along with custom tool.

Thanks

@toi500
Copy link

toi500 commented May 13, 2024

The new version of the Conversational Retrieval Agent is the new Conversational Agent if I am not getting this wrong.

Did you try this?

Instead of just attaching the Pinecone node through the Retriever Tool (like in Flow 2), use the Chain Tool to incorporate the entire chain.

--

image

0001 Chatflow.json

@niztal
Copy link
Contributor Author

niztal commented May 13, 2024

The new version of the Conversational Retrieval Agent is the new Conversational Agent if I am not getting this wrong.

Did you try this?

Instead of just attaching the Pinecone node through the Retriever Tool (like in Flow 2), use the Chain Tool to incorporate the entire chain.

--

image [0001 Chatflow.json](https://github.com/FlowiseAI/Flowise/files/15289174/0001.Chatflow.json)

@toi500

Thanks I was trying that either, I think the conversational retrieval QA is not made for this purpose, I get the following error:

"chain.run is not a function"

@HenryHengZJ
Copy link
Contributor

any luck with Tool Agent?

@HenryHengZJ HenryHengZJ added the question Further information is requested label May 13, 2024
@HenryHengZJ HenryHengZJ changed the title [BUG] Differences among Conversational Retrieval QA to Conversational Retrieval Agent [Question] Differences among Conversational Retrieval QA to Conversational Retrieval Agent May 13, 2024
@niztal
Copy link
Contributor Author

niztal commented May 13, 2024

any luck with Tool Agent?

Tried it as well same behavior

@toi500
Copy link

toi500 commented May 13, 2024

It looks like that the Chain Tool is bugged or outdated too.

#2400 (comment)

@niztal
Copy link
Contributor Author

niztal commented May 15, 2024

@toi500 @HenryHengZJ any news? It's blocking us

@toi500
Copy link

toi500 commented May 15, 2024

I don't believe it's possible to achieve the same level of comprehensive response from the Agent using the Retrieve Tool, as you're attempting in flow 2. What the Agent is doing there is executing a vector similarity search in Pinecone without the proper context.

The only way to obtain similar results as the flow 1 is to instruct the Agent to utilize the whole chain as a tool, and this, if I am not getting this wrong, can only be achieved via the Chain Tool, bugged at the moment.

@sirsimonson
Copy link
Contributor

How about adding a HyDe Retriever? It doesn't yield the same results but you could apply a prompt on the documents returned.

Otherwise very interesting detail shared here I was also not happy with the retriever tool only.

@niztal
Copy link
Contributor Author

niztal commented May 18, 2024

fixed this issue via PR

@toi500 @sirsimonson FYI

@toi500
Copy link

toi500 commented May 20, 2024

@niztal any news about ur pull request? Can wait to test it out.

I know kow the team is busy with the implementation of LangGraph (0718b1c), which is amazing by the way, but I hope ur new agent comes to light too.

@niztal
Copy link
Contributor Author

niztal commented May 20, 2024

@niztal any news about ur pull request? Can wait to test it out.

I know kow the team is busy with the implementation of LangGraph (0718b1c), which is amazing by the way, but I hope ur new agent comes to light too.

@toi500 unfortunately no, I'm still waiting for @HenryHengZJ to review that.

Either way I'm using it and it works perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants