-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Hi team,
I've been reading through your paper "Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory" and comparing it with the open-source implementation. I noticed something that confused me, so wanted to check if I'm missing something.
What I expected (from the paper):
According to the paper and Figure 2, the extraction phase should include:
- A conversation Summary (fetched from database)
- Last m messages (recent conversation history, where m=10 in the paper)
- Current message pair
The paper mentions: "the system employs two complementary sources: (1) a conversation summary S retrieved from the database that encapsulates the semantic content of the entire conversation history, and (2) a sequence of recent messages {mt−m, ..., mt−2}"
What I found in the code:
Looking at mem0/memory/utils.py (line 6-7):
def get_fact_retrieval_messages(message):
return FACT_RETRIEVAL_PROMPT, f"Input:\n{message}"This function only returns:
- A static prompt template (
FACT_RETRIEVAL_PROMPT) - The current message
I don't see any database queries for:
- Previous conversation summary
- Recent message history
My questions:
- Is the Summary Generator and "Last m messages" feature implemented in the open-source version? If so, where can I find it?
- Or is this a difference between the research implementation and the production code?
- If it's not implemented yet, is it on the roadmap?
I'm asking because I'm trying to understand how the context is built for memory extraction, and the paper's description doesn't seem to match what I'm seeing in the code.
Thanks for any clarification! Really impressed with the project overall.