Hey folks, I'm running into a problem with date-based data, and am interested if anyone has come across a solution.
If someone asks a question "what's happening next week", I'd like the vector search to be able to retrieve the nodes related to the date range of next week. Obviously if the query just says "next week" and does not have a date, it will not retrieve the correct nodes. So, some processing is needed on the query.
I have some thoughts/ideas on how to do this, but would like some guidance if I'm on the right track.
A - Nodes) Date contents can be pre-processed in nodes and added as metadata to the node for filtering. B - Queries) The semantic meaning of the query can be processed such that "next week" is subbed out with an actual date, and that date gets used for filtering TopK.
The thing is, for B), I can't seem to find any algorithms for extracting said date context. Is this something where I am forced to use the LLM?
yea for B, you are basically forced to use the LLM π
Have you seen the auto retriever? You can get the LLM to write the query/filters on the fly. You can provide current date info in the prompt there most likely