Building a RAG chatbot has become a well-marked exercise: split the content into chunks, compute embeddings, search by similarity, hand the relevant passages to a model, generate the answer. It's an increasingly well-documented craft, built on solid pieces. We did it for GoodBarber apps: a chatbot that answers users' questions from the content published in the app — articles, events, points of interest — and not from the model's general memory.

That part, the documented part, was by far the easiest.

Except that in our apps, not everyone is allowed to read the same thing.

The lock you already have

Plenty of apps run on subscriptions. A publisher with free articles and members-only ones. A training platform whose courses are reserved for the people who enrolled. A creator who keeps their most substantial work for the people who pay. The membership system exists precisely for that: it decides who gets access to which content.