-
Notifications
You must be signed in to change notification settings - Fork 155
Description
Motivation
The memory filtering system is designed to determine which conversation snippets are worth storing for later retrieval and summarization. However, the current implementation has a bias against short statements, causing it to discard brief but critical information like action items ("Remember to get milk"), quick decisions, or concise personal details. This results in a poor user experience where important reminders and tasks are lost, defeating the purpose of a memory system. Fixing this false-negative problem will ensure that brevity doesn't equal unimportance, making the memory system more reliable and useful.
Current Behavior
The memory filter in backend/utils/llm.py uses an LLM prompt to classify conversation snippets as worth keeping or discarding. The current prompt implementation implicitly treats length as a quality signal, causing short but meaningful statements to be incorrectly flagged as unimportant and discarded.
Reproduction Steps:
- Navigate to the
should_discard_conversationfunction inbackend/utils/llm.py - Examine the current prompt that determines whether to discard a conversation
- Test the function with a short action item transcript:
"Remember to get milk" - Test the function with a brief personal detail:
"My birthday is June 15th" - Test the function with a quick task:
"Call the dentist tomorrow" - Observe: These short but important statements are likely being discarded (returning
discard = True) because the prompt doesn't explicitly protect against length-based filtering
Expected Behavior
The memory filter should evaluate conversation snippets based on their semantic content and importance, not their length. Short statements that contain action items, decisions, questions requiring follow-up, personal details, or key insights should be kept regardless of how brief they are.
Acceptance Criteria:
- The prompt explicitly states that length is not a discard criterion
- The prompt includes clear KEEP rules for tasks, requests, action items, decisions, commitments, follow-up questions, personal facts, and insights
- Short action items like "Remember to get milk" are correctly classified as
discard = False - The function output format remains unchanged (
discard = True|False) to maintain compatibility with downstream code - Brief personal details and single-line commitments are preserved in memory
Steps To Test
- Manually test the
should_discard_conversationfunction with various short but important statements:"Remember to get milk""My favorite color is blue""Let's meet at 3pm tomorrow""I need to call mom"
- Verify these return
discard = False - Test with genuinely unimportant short statements (e.g., "uh huh", "okay", "yeah") and verify they still return
discard = True
Submission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx