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

Pass Specific Entities Into the Context Window #42

Open
kingjulio8238 opened this issue Jun 3, 2024 · 2 comments
Open

Pass Specific Entities Into the Context Window #42

kingjulio8238 opened this issue Jun 3, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@kingjulio8238
Copy link
Owner

As outlined in the readme, memary currently extracts the top N entities (set to 20) from the Entity Knowledge Store. We pass these entities into the new context window for inference.

memary can future benefit from more advanced memory compression techniques such as passing only the entities that are present in the agent's response to the context window. This will help the system understand the users' knowledge of concepts for that specific execution which will lead to more relevant responses.

We look forward to related community contributions.

@kingjulio8238
Copy link
Owner Author

To further elaborate:

If the response from the ReAct agent is “The Mona Lisa can be found in the Louvre in Paris” then only the counts and recency of these entities (Mona Lisa, Louvre, Paris) are passed into the context window to infer user knowledge around the topic. Before we were passing the top 20 entities regardless, not considering which entities were in the response.

@kingjulio8238 kingjulio8238 added the enhancement New feature or request label Jun 4, 2024
@kingjulio8238
Copy link
Owner Author

Here is what the new design for entity extraction could look like (second image). Simpler and more effective.

old-extraction

new-extraction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant