Find answers from the community

Updated 3 months ago

General question I ve found indexing to

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?
L
C
3 comments
Yea, as @isaackogan mentioned, you could add the metadata to each document, but this is a little repetitve.

If you were using an agent, you could have a special query engine that gets built on the fly with the latest stats from the actual query engine?

Otherwise, the pandas engine is the next best option. Not sure why it's slow for you though πŸ€”
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?
Yea that won't really help as much.

Like, that metadata will get inherited to every node, but it's going to be hard for the model to reason across that data πŸ€”
Add a reply
Sign up and join the conversation on Discord