Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

different with langchain #22

Closed
successren opened this issue Mar 28, 2023 · 2 comments
Closed

different with langchain #22

successren opened this issue Mar 28, 2023 · 2 comments

Comments

@successren
Copy link

Hi, great work! But what's the difference with langchain?
https://python.langchain.com/en/latest/modules/memory/getting_started.html

@shahrukhx01
Copy link
Contributor

Hi @FieldRen, The current memory implementations in langchain are heuristic-based, meaning you are using all the conversation history or the last k messages. Hence, such approaches are not adaptive if the user changes the topic which was part of earlier conversation history, the heuristic approaches might miss it because of token overflow or it could be outside the last k messages. We in our case try to make the history component adaptive hence, it only brings the previous k messages which are relevant to the current message from the entire history. Hence, adding more relevant context in the prompt and never running out of token length. Below is an example:

If you want to delve deeper into current memory implementations of langchain, here is a great article.

@successren
Copy link
Author

successren commented Mar 28, 2023

I got it, It's a very good idea.Thanks for your explanation!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants