Can semantic recall put more importance on more recent context?

My issue is that my agent keeps pulling old information about a task. Let’s say the task is “submit a YC demo.” Even though I’ve completed it, and told the agent I’ve completed it , it still keeps semantically recalling older messages where I haven’t completed it yet. It’s not pulling the most recent state. Is there a way to fix this?
3 Replies
Mastra Triager
📝 Created GitHub issue: https://github.com/mastra-ai/mastra/issues/10623 🔍 If you're experiencing an error, please provide a minimal reproducible example whenever possible to help us resolve it quickly. 🙏 Thank you for helping us improve Mastra! 📝 Created GitHub issue: https://github.com/mastra-ai/mastra/issues/10624 🔍 If you're experiencing an error, please provide a minimal reproducible example whenever possible to help us resolve it quickly. 🙏 Thank you for helping us improve Mastra!
Ward
Ward2w ago
I think you're encountring this bug https://github.com/mastra-ai/mastra/pull/10543
GitHub
fix(memory): recall() with lastMessages returns newest messages, no...
Summary When using lastMessages: N config without an explicit orderBy, the recall() function was returning the OLDEST N messages instead of the NEWEST N messages. This completely breaks conversatio...
Ward
Ward2w ago
how does your semantic recall options look like?

Did you find this page helpful?