(memory) [2024-05-30] My daughter turned 11 today!
System prompt: Today is 2025-08-21
User prompt: How old is my daughter?
The vector DB does the work of fetching the daughter-age-related memories, your system decides (perhaps with another LLM) if the question needs time-based sorting or something else.
Yeah good call, I missed that. I don't think there's a correct answer here, but it could be another step of the read or write. Either it would do another lookup of "my daughter" -> Name on read, or do a lookup on write if you already have a "my daughter is Name" memory. Whatever's less expensive in the long run. The graph memory someone else mentioned also seems like a good option there.
(memory) [2023-07-01] My daughter is 10
(memory) [2024-05-30] My daughter turned 11 today!
System prompt: Today is 2025-08-21
User prompt: How old is my daughter?
The vector DB does the work of fetching the daughter-age-related memories, your system decides (perhaps with another LLM) if the question needs time-based sorting or something else.