Dimensions vs shape

Hi everyone,
I was focused on the discussion weather to use dimensions or shape argument in my hierarchical bayesian models, the understanding i have is that we use dimensions when we already have a categorical feature in our data segmenting different groups (we can also create this feature and then we pass those unique values from that categorical feature into out dims argument) and we use shape in the other case.

You can use both but dims already informs the shape of the variable