Skip to content

[enhancement] Support topics and entities as filter in Summary Views #225

@PrasanKumar93

Description

@PrasanKumar93

Summary

Summary Views currently support only four keys for filters and group_by: user_id, namespace, session_id, and memory_type. This proposal requests adding topics and entities as supported keys, enabling domain (topic) specific summary views that are far more useful for real-world applications.

Motivation

In a wealth advisor demo application, we have long-term memories tagged with topics like investment, retirement, cash flow. Currently, the only way to create a focused summary is to summarize all memories for a user and depend on LLM prompt property control the output. There's no way to pre-filter at the data level.

With topics and entities support, we could create summary views like:

{
  "name": "Investment Strategy Summary",
  "source": "long_term",
  "group_by": ["user_id"],
  //"prompt":"",
  "filters": { "topics": { "any": ["investment", "portfolio", "retirement"] } }
}

{
  "name": "Per-Topic User Summary",
  "source": "long_term",
  "group_by": ["user_id", "topics"]
}

{
  "name": "Entity-Focused Summary",
  "source": "long_term",
  "group_by": ["user_id"],
  "filters": { "entities": { "any": ["Vanguard"] } }
}

These would allow applications to generate targeted summaries like "What does the system know about this user's retirement planning?" or "Summarize all interactions involving Vanguard funds."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions