Assistant Filtering and Metadata
# 🧶︱general
r
Hello! I'm fairly new to Pinecone. I've set up an Assistant and uploaded files using the UI. As I'm testing queries and responses in the sandbox, is it possible to "correct" responses through the UI, or will anything I tell it in the sandbox not apply globally? Here's my scenario: I'm creating a chatbot for a hotel and have uploaded their marketing materials. Some of the marketing material only applies to specific uses - i.e. their Weddings and Events brochure, but the Assistant is using info from there to respond to general questions. Do the files need to be replaced and be better formatted with instructions like "The information in this file should only be used for questions about weddings and events", or can I simply correct the bad response saying the same thing, and it will automatically apply it to all responses based on this file? Thanks in advance.
m
Hi @rich-secretary-83836 and welcome to the discord!
If you don't mind me asking a few followup questions: - are you just testing through the interface now, and plan to use the Assistant API later for production? Or is this just for personal use?
I can answer one right away though: you can't correct responses permanently through the interface like you described. Very interesting idea though!
I'm not sure if any chatbot can do that right now, but if that's something that would make your life easier while developing, that's good for us to know!
a
you may also want to consider using metadata filtering on each query. If you know that certain documents should or should not be used within a given query, then you can filter them out at query time. It gets a little bit harder if you don't know as part of your application...you can think about using a smaller LLM to figure that out based upon the query and that's sometihng we're working on native improvements for as well
r
Thanks Arjun and Perry! Yes and yes. I am testing the interface using the UI and using the API in production. Yeah, so I guess if I want to do the metadata filtering then I need to add a text classifier to the user query and add the document filter if needed. Would it be easier if I just put instructions into each document on how the data should be used, or will that not work? It would be cool if I could do interactive corrections and training through the API 🙂
a
It's an interesting approach, but I'm not sure that adding instructions to the documents will work though since it seems to me that there is still some similarity between the question and those documents.
I'm not sure, but you might be able to achieve something similar with the system prompt? But if we step back a minute here, how would you determine when to use the Weddings and Events brochure vs when to ignore it?
r
I would want to use the doc only if the question is related to weddings or parties or events - so I'm thinking either: 1. I build a n8n workflow with a text classifier to check the questions and then send the query to pinecone with a file metadata filter or 2. I have to restructure the brochure into a question-and-response type document with questions related to Weddings and Events. I could easily do #2 I guess, and then no additional work would be required?
Because yes, you are right, other documents for example do have menus in them, but the Weddings and Events brochure has specific event menus in them. However when a website customer asks about what kinds of food is available at the Hotel, the chatbot is providing the event menu.
To your point about the system prompt, can I use the system prompt to specify which file it should use to answer a specific type of question?
"For questions about weddings, special events, corporate events, and large parties, refer to the information in the Weddings brochure, for other questions exclude this brochure". Would that work?
a
I'm checking with the team and will get back to you 🙂
f
Hey @rich-secretary-83836 ! Your questions is super awesome and I'd love to dig into it with you. Would you be open to a quick real time chat, either here or on any other platform (Zoom, Google meet, etc?).
r
Sure, I'm open to chat. I'm on Pacific Standard Time, and am available mostly 10-5 PM M-F. Let me know what works!
f
Great! I’ll reach out on Monday.
r
sounds good
7 Views