Skip to content

Issue #15 - [BUG] Memory filter incorrectly discards short action items and important single-line statements #24

@rogelio-cmj

Description

@rogelio-cmj

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:

  1. Navigate to the should_discard_conversation function in backend/utils/llm.py
  2. Examine the current prompt that determines whether to discard a conversation
  3. Test the function with a short action item transcript: "Remember to get milk"
  4. Test the function with a brief personal detail: "My birthday is June 15th"
  5. Test the function with a quick task: "Call the dentist tomorrow"
  6. 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

  1. Manually test the should_discard_conversation function 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"
  2. Verify these return discard = False
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions