mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

Help in excluding personal information from the conversation

Open deshraj opened this issue 10 months ago • 1 comments

Discussed in https://github.com/mem0ai/mem0/discussions/2163

Originally posted by Bharatram-Natarajan January 20, 2025 Hi all, 'excludes' parameter in client.add seems not to work consistently. This is the example provided for your reference

conversation_info = [ {"role": "user", "content": "hi, i need help with my laptop. Its not turning on. Regards priya Staff data scientist xyz company"}, {"role": "assistant", "content": "what kind of issue is being faced?"}, {"role": "user", "content": "The screen is blank.i tried pressing the start button multiple times. priya Staff data scientist xyz company"}, {"role": "assistant", "content": "Try holding the power button for 5 seconds. As the system would have gone to sleep mode."}, {"role": "user", "content": "Tried the same.Not helpful. priya Staff data scientist xyz company"}, {"role": "assistant", "content": "Ok. let me check what else can be done?"}, ]

excluded_information = "personal information, sensitive data"

ass_res = mem_client.add(conversation_info, user_id='priyav1', excludes= excluded_information, output_format="v1.1")

The above response includes the personal information in the memory like 'priya', 'staff data scientist at xyz website'.

Can someone help me how to properly exclude personal information?

deshraj avatar Feb 16 '25 18:02 deshraj

We looked into this issue, and here is what we found:

The excludes parameter provided specifies "personal information", which is quite broad and can be interpreted in different ways. Typically, personal information refers to sensitive data like bank account details or social security numbers. However, in some cases, it may also include names, job titles, or other identifiers.

To achieve the expected behavior, we refined the exclusion criteria to "personal information such as name", and this successfully removed the personal details from memory. We might have to specify exclusions more explicitly to get the desired outcome.

prateekchhikara avatar Feb 19 '25 01:02 prateekchhikara