Hey All,
I’m looking for some advice on the best way to approach a specific chat bot problem. Heres the use case:
I’m building a chat bot to help people manage their clothing inventory and learn more about the clothing they own. I would like the user to be able to not only query the chat bot for specific answers to questions such as “What is the best clothing for xyz…” but also “What do I have in my closet” or “Remove this shirt from my closet”.
My chat bot uses multiple assistants + 1 thread shared between these assistants and at the top most layer, i classify the incoming question based on the previous 6 messages and then feed the query into the appropriate completion OR assistant.
My question is really about this kind of architecture. I’m struggling with the use case where you add or remove clothing. I want to use completions API for this because its a one shot question like “I would like to add xyz shirt, put it in this shelf etc” and I want the API to return formatted JSON back to me which i can then use, but if the user hasn’t filled out certain portions of the JSON object, we cant move forward, so should I be using the assistants API for this?
Here is my architecture in stepwise format:
- Classify incoming question based on previous 6 messages (Completions API)
- Feed query into appropriate assistant OR completion API
- If recommendation → use an assistant and same thread
- If action such as removal or adding, use completions API
- If user is missing info from their removal or add query, I force the next incoming question classification to basically handle the response for this message.
Does this make sense or am I over complicating? The issue is that the assistants API isn’t great with returning structure JSON data to my API.