Find answers from the community

Updated 4 weeks ago

Handling date and price related queries in vector search

Hi,

How can we perform vector search on date related queries like
  1. List invoices starting from oct 2023
  2. List invoices raised in last quarter
  3. Invoices between apr 24 to jul 24
  4. Invoices with total amount exceed/lower by x amount
  5. Compare the latest invoice raised by ABC vendor with invoice from last quarter
How do you guys are handling these kind of dates, price related queries
L
k
t
4 comments
You need an LLM to be able to infer metadata filters for your vector search
I would be interested in some pointers here too. Not sure I understand you @Logan M would you mind clarifying a bit?
he means to say that, you need an LLM to understand the query and extract metadata filters data
Usually this can be done in 2 ways
  1. Using NLP library like SpaCy or with BERT model to extract entities
  2. By calling gpt through api calls
Then after applying filter search + vector search on database for more fine grained results
Thanks for clarifying!
Add a reply
Sign up and join the conversation on Discord