langchain-ai / langchain

🦜🔗 Build context-aware reasoning applications
https://python.langchain.com
MIT License
88.75k stars 13.95k forks source link

DOC: Example of agent with redis memory is not working properly #21243

Open tinkering-bhatia opened 2 months ago

tinkering-bhatia commented 2 months ago

Checklist

Issue with current documentation:

https://python.langchain.com/docs/modules/memory/agent_with_memory_in_db/

Screenshot 2024-05-03 at 3 20 25 PM

As you can see here, Agent cannot extract the memory context correctly because it is not able to recognize which country's national anthem is being asked about, whereas you can clearly see in the Chat message history that Canada is the country in question. Is this a bug, and it actually works but is wrong in the docs? Or is there a new way to do this and docs haven't been updated?

Idea or request for content:

Agent with Memory in redis

liugddx commented 2 months ago

Let me see.