Hi All, I'm having a hard time extracting dates from user query. I'm using auto retriever to filter by metadata using Qdrant vector DB and OpenAI GPT 4. The issue is that the dates need to be converted to integers (unix timestamps) since Qdrant doesn't have a date type. In my VectorStoreInfo >MetadataInfo field description I've stated that the value needs to be unix timestamp but it seems that the values returned by GPT4 are not exactly correctly converted. They are almost but not exact for example it will convert 04/01/2023 to 1682995200 wich is some time in May.
Hi @nerdai Yes, that is what I'm doing now. I want to rely more or as much as possible on LLM the reason being then I can support various user inputs like Apr 1st 2022 or 4/1/2022 etc. This is supposed to be the LLM's strength.
Oh what I mean is use a combo of GPT4 and deterministic. I think you mention it doesn't do succeed all the time in unix conversion. So can you consider using GPT4 to extract the dates and write it to a standard date format other than unix timestamp then use a deterministic process to get to final unix destination. Maybe GPT4 will be better at outputting that other format?
Yep, I got you @nerdai , that is in fact what I'm doing now detecting date in mm/dd/yyyy format and then converting to unix timestamp. Seems to be working so far but whenever whereever possible I'm trying to rely on LLMs.