feat(social): conversation topic memory (Issue #299) #304

Merged
sl-jetson merged 1 commits from sl-jetson/issue-299-topic-memory into main 2026-03-02 21:35:36 -05:00
Collaborator

Summary

  • Adds topic_memory_node to saltybot_social
  • Subscribes /social/conversation_text (String, JSON {person_id, text})
  • Keyword extraction pipeline: lowercase → strip punctuation → filter (alpha + length) → remove English stop words → deduplicate → cap at max_keywords_per_msg
  • PersonTopicMemory: ordered rolling list, dedup with recency promotion (duplicates move to front), capped at max_topics_per_person, evicts oldest when full
  • Stale-person pruning: removes persons idle for > prune_after_s (default 30 min; 0 = disabled)
  • Publishes JSON on /saltybot/conversation_topics on each incoming utterance:
    {"person_id": "alice", "recent_topics": [...], "new_topics": [...], "ts": ...}
  • Enables recall: recent_topics (most-recent first) can answer "last time you mentioned X"
  • 71/71 tests passing

Files

  • saltybot_social/topic_memory_node.pyextract_keywords + PersonTopicMemory + TopicMemoryNode
  • config/topic_memory_params.yaml — defaults
  • launch/topic_memory.launch.py — launch with key args
  • test/test_topic_memory.py — 71 tests
  • setup.pytopic_memory_node entry point added

Closes #299

## Summary - Adds `topic_memory_node` to `saltybot_social` - Subscribes `/social/conversation_text` (String, JSON `{person_id, text}`) - **Keyword extraction pipeline**: lowercase → strip punctuation → filter (alpha + length) → remove English stop words → deduplicate → cap at `max_keywords_per_msg` - **`PersonTopicMemory`**: ordered rolling list, dedup with recency promotion (duplicates move to front), capped at `max_topics_per_person`, evicts oldest when full - **Stale-person pruning**: removes persons idle for > `prune_after_s` (default 30 min; 0 = disabled) - Publishes JSON on `/saltybot/conversation_topics` on each incoming utterance: `{"person_id": "alice", "recent_topics": [...], "new_topics": [...], "ts": ...}` - Enables recall: `recent_topics` (most-recent first) can answer *"last time you mentioned X"* - **71/71 tests passing** ## Files - `saltybot_social/topic_memory_node.py` — `extract_keywords` + `PersonTopicMemory` + `TopicMemoryNode` - `config/topic_memory_params.yaml` — defaults - `launch/topic_memory.launch.py` — launch with key args - `test/test_topic_memory.py` — 71 tests - `setup.py` — `topic_memory_node` entry point added Closes #299
sl-webui added 1 commit 2026-03-02 21:11:38 -05:00
feat(social): conversation topic memory — Issue #299
Some checks failed
social-bot integration tests / Lint (flake8 + pep257) (push) Failing after 9s
social-bot integration tests / Core integration tests (mock sensors, no GPU) (push) Has been skipped
social-bot integration tests / Lint (flake8 + pep257) (pull_request) Failing after 9s
social-bot integration tests / Core integration tests (mock sensors, no GPU) (pull_request) Has been skipped
social-bot integration tests / Latency profiling (GPU, Orin) (push) Has been cancelled
social-bot integration tests / Latency profiling (GPU, Orin) (pull_request) Has been cancelled
797ed711b9
Adds topic_memory_node to saltybot_social:
- Subscribes /social/conversation_text (String, JSON {person_id, text})
- Extracts keywords via stop-word filtered pipeline:
    lowercase -> strip punctuation -> filter length/alpha -> remove
    stop words -> deduplicate -> cap at max_keywords_per_msg
- Maintains per-person rolling topic history (PersonTopicMemory):
    ordered list, dedup with recency promotion, capped at
    max_topics_per_person, evicts oldest when full
- Prunes persons idle for > prune_after_s (default 30 min; 0=disabled)
- Publishes JSON on /saltybot/conversation_topics on each utterance:
    {person_id, recent_topics (most-recent first), new_topics, ts}
- Enables recall like 'last time you mentioned X'
- 71/71 tests passing

Closes #299
sl-jetson merged commit a8838cfbbd into main 2026-03-02 21:35:36 -05:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#304
No description provided.