Incorporating Mixed Effect model in EIG

I’m working on optimizing an experiment with VI. The model is a linear model of the form y=ax+b, with b being subject dependent. I’m not quite sure how to incorporate this with the existing tutorial.

My rough idea is that when training, we sample a random intercept, and treat the subject as if it’s an observation.

I imagine this would work as long as we have a good prior for subject intercept. But how would this be used to obtain a posterior once we get new data?