-
Notifications
You must be signed in to change notification settings - Fork 136
Description
Is your feature request related to a problem?
Currently, there is a functional discrepancy between Episodic Memory and Semantic Memory search capabilities. While episodic_memory search allows users to specify a score_threshold to filter results based on relevance, this parameter is missing from the semantic_memory search method.
Without this threshold, semantic search results can sometimes return low-relevance "noise" that can confuse downstream LLM logic, especially when the vector database returns the top-k results regardless of how distant they are in the embedding space.
Describe the solution you'd like
I would like to propose adding an optional score_threshold parameter to the semantic memory search interface, consistent with the existing episodic memory implementation.
Describe alternatives you've considered
Currently, I have to manually filter the results in the application layer after the search is performed. However, doing this at the engine level (or passing it down to the vector store) is more efficient and provides a cleaner API for users.
Additional context
Consistency between episodic and semantic memory interfaces is crucial for developers building complex memory-augmented pipelines (like RAG systems). Ensuring both memory types support thresholding will allow for more robust memory retrieval.