langchain-ai / rag-from-scratch

1.63k stars 453 forks source link

Query Construction generates the wrong filter on the publish_date metadata filter #22

Open matt-hull0 opened 3 weeks ago

matt-hull0 commented 3 weeks ago

https://github.com/langchain-ai/rag-from-scratch/blob/abafe332aea1b841989b830a494f97634ecbe5f0/rag_from_scratch_10_and_11.ipynb#L626

image

For video's published before 2024, the filter should be latest_publish_date and not earliest_publish_date.

Is there anything that could be done in LangChain to improve the performance and give the correct response? Or is it a case of trying a different LLM that might perform better?

Many thanks