General question: I've found indexing to work great on allowing a chatbot to find the right information, but there's a flaw in that the chatbot lacks meta information. I.e. I pass it an index to a catalog with 150 items, then I ask it how many items there are, or how many items are blue, and it fails that question. Using Pandas dataframe agent did work, but it was very slow. My best workaround so far has been to pass these meta stats in a starting prompt, but that doesn't scale generally - has anyone found a good solution?
Not sure why the pandas agent is slow for me. I've seen a few issues with it, including api calls getting rejected and needing to be repeated, and errors where the df cannot be found. I think my use case is mainly for retrieval, most questions will require only 1 or a few documents, but I would like the engine to be able to answer the occasional meta questions.
So I've tried adding meta_data to the documents like this: documents = [Document(text=t, extra_info={'title': title, 'on_sale': sale}) for t, title, sale in zip(a, titles, sales)] This doesn't seem to help the answers though. Am I doing it correctly?