Using the Agent Chat View Node with Vector Store for RAG in KNIME AP 5.5

Hello.

I understand that the Agent Chat View node was newly released in KNIME AP 5.5.
How can this node be used in combination with Vector Store nodes to implement a RAG (Retrieval-Augmented Generation) approach?
If there are any good use cases or examples, I would appreciate it if you could share them.

Best regards,

hhkim

Hey there,

I have played around with this (in collaboration with @mwiegand ) and had success by turning workflows containing different vector stores into individual tools that the agent can use.

This helps the case where you have knowledge about very different domains - rather than having it all in one vector store you now can just have two vector stores (or more) depending on the topic.

For now I implemented querying each vector store as it’s own tool so that the agent could pick a tool based on the context of a user question - I’m sure this can also work when you implement one tool with an additional parameter that allows the agent to select which vector store he wants to access (and inside your tool you then have a case switch set up…)

You can debate whether it is the right approach to have the vector store retriever and in addition an LLM to create an initial response inside the tool or just pass back the best hits in raw format via Tool Message Output.

Here is an example of one of the tools:

4 Likes

Thank you for your response.

However, what I would really like to know is how to use the node below.
Could you introduce an example that combines this node with Vector DB nodes?

I’m afraid I can’t do that due to other priorities right now - however I recommend you review the following example from the community hub:

Ask me anything Agent (may have to copy the link and paste):

https://hub.knime.com/knime/spaces/AI%20Extension%20Example%20Workflows/4)%20Agents/Ask%20me%20Anything%20Agent~qjkZmMLuRmTXQ4ey/

This agent uses different tools. The main workflow gives a good idea how to wire your agent up in general:

In the tools folder there is a company information tool:
https://hub.knime.com/knime/spaces/AI%20Extension%20Example%20Workflows/4)%20Agents/Ask%20me%20Anything%20Agent/Tools/ToolCompanyInformation~BXr4l_O5UY2gb4Yz/current-state

This simplified tool uses string matching to fetch data - imagine you replace that with the same information in stored in a vector store.

If you are not familiar with how to set up vector stores see this:

and this:

3 Likes