Find answers from the community

Updated 2 months ago

Hey folks, I'm running into a problem

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?
L
i
6 comments
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

Otherwise you can do your own custom thing πŸ‘
Funny enough I was just in the middle of designing a system just like that @Logan M
It's funny how universal these issues are πŸ˜‚
Definitely leaving this till the work-week starts. Not getting down this rabbit hole on Sunday LOL
Thanks as always :)
lol fair! Good luck! :dotsCATJAM:
Add a reply
Sign up and join the conversation on Discord