Need suggestion regarding Assistant API

Hey Guys,
I am currently working on a project where we’re building an ai powered therapist aiming to provide an accessible, empathetic, and personalized mental health support, but I have a few questions.

a. Should the setup be either:
1. Separate assistant for each user.
2. A single assistant for all user and then create a new thread for every
session.

b. Let’s say I’ve created a session (thread), if I don’t delete it manually, for how long will it be there given that it is not active (no messages are being added).

c. If I have one assistant per user ,will the assistant be influence by the past conversations/sessions of the particular session.

p.s. Any additional suggestions on this topic would be greatly appreciated.

a) We are also building assistants for our customers – although in a very different application. For us, we build a separate assistant for each different customer, because each customer has a completely different knowledge base (uploaded a files into a vector store). I think you want a different assistant ONLY if you need a different set of files. That’s because it is easy to specify different instructions (which may be patient-specific) to the assistant as you use it.

b) Regarding cleanup, OpenAI has done a nice job of cleaning up automatically after you. You don’t normally need to delete anything. You can override the default expiration dates on things if you need to.

c) The message context is stored in the Thread. I’d recommend one assistant, one thread for each patient.

We’ve learned that the trickiest area is if you are using files as a knowledge base. Too much to cover in this reply. Otherwise, it all seems quite easy.

1 Like

I would also go for one assistant per user in your case.

I see the assistant as one “patient journal” and not as one “therapist”. So for any given user, you would have multiple sessions (threads) which should be associated with the same assistant.

I thought the same thing, but the thing is thread operates independent of the assistant. Assistant is only their to provide instructions (i.e. with what context we have to address the request) and to specify what model to use. And lets say over time I decide to change the instructions or the model of the assistant I would have to do it for all the assistants.

Yes, but you could also see that as a benefit. That you can tweak instructions on a “per patient journal” … but in the end it’s just how you see your data.

I’m building one assistant for each customer + language. I could have decided to do ONE assistant for each customer and have the assistant instructions know about various languages. In the end I decided on the customer + language setup because the assistant needs to know about local rules (tax rules, currencies, etc) but I could as well have gone the other way.

Although in a completely different domain, we are building ai powered personallized assistant. The conclusion that I came to is neither option 1 or 2; but an hybrid option.

In our domain, we cater to, literally, 100K+ users. Each one of the users is different; but not uniquely so (they share some common characteristics… country, language, demographics etc). So our base case has always to been to use data to distinguish (i.e. provide additional system context at the user level that the base system context can rely on).

That said, we do also see that base assistant, which has the base system context, evolving with time; as we begin to generalize different interactions that we see across the user base. Then we begin to endow certain users with the assistant’s help from the “evolved” assistant. This, incidentally, also makes it easy to do A/B testing in the wild; at scale.

hth