Dynamic Knowledge

Hi there. We are developing a chat app, and we have two critical questions.

  1. How do you create a chat-like interaction with the crew? The only thing that comes to my mind is:
loop:
take user input
kickoff crew

But how does the crew remember what the user asked previously, then? Maybe it has something to do with the memory? Or perhaps we must include the previous request-response in the inputs?
Maybe a more sophisticated approach exists (maybe by utilizing flows somehow).

  1. We are implementing a crew that needs to recommend certain stuff to users based on knowledge persistent between sessions. The crew must update that knowledge through interaction with the user. So we need something like dynamic knowledge.
    E.g., imagine our app were to recommend news. Now, imagine that during the conversation, it turns out that the user is young and prefers news about the US and democrats, and only the most recent… but his preferences may change dynamically. Agents must update the knowledge about the user as soon as they realize it.

To solve it, one thing that comes to my mind is to have some unstructured storage and give agents a tool to update that knowledge and read from it (rag tool for instance).

However, I also know about knowledge and memory. So maybe it would be better to utilize those things. But since I am unsure how exactly to implement a loop, I am lost.

Thanks in advance for any recommendations.

How do you create a chat-like interaction with the crew?

Yes, a loop where you kickoff the crew on every turn is the way to go.

But how does the crew remember what the user asked previously, then?

You need to implement short term memory and long term memory and pass these into the crews context on kickoff

I have a few blog posts on the topic, not sure if you have seen them, here are links to the GitHub repos for reference conversational chatbot and knowledge chatbot.

The crew must update that knowledge through interaction with the user.

Take a look at Mem0, it might help you manage preferences and build up knowledge about the user. It has a native implementation in CrewAI.

I hope this answers some of your questions.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.