In Memobase, we try to memorize user in a controllable, global context. So that the get process is really fast and won’t affect your latency.

But sometimes, you may want to search for something specific in the user’s profile or context.

Memobase offers a search method for you to filter out the unrelated memories.

p = u.profile(
    chats = [{"role": "user", "content": "Find some restaurants for me"}], 
    need_json=True
)

print(p)

API Reference

c = u.context(chats = [{"role": "user", "content": "Find some restaurants for me"}])
print(c)

API Reference

The search in Memobase is not a semantic-matching or keyword-matching, it heaily relies on the features of user, and using AI to rank what may be relevant. For example, when user says “Find me a restaurant”, Memobase does’t just search for “restaurant”, it thinks what aspects of user will help to answer this question, so:

  • user has a profile basic_info:location, that will help to decide the location of the restaurant.
  • user has a profile interests:food, that will help to decide the food type.
  • user has a profile basic_info:allergies, that will help to decide what not to include.

And then Memobase will use those relevant profiles to search the possible user events to recall the details.

In result, Memobase’s search is much more helpful than a semantic search, and can help to answer the question.