I am wondering about that as well. Unfortunately, I can't give you a definitive answer but on this page I found the following statement:
Since hit groups need information about the geometry that was hit –
its vertex data and material properties – you typically need a local
root table for them. To avoid passing data through the local root
table, you may also use the instance id field in the top-level
instance descriptor and utilize the instance index, which are
implicitly available in the hit group shaders. Remember, though, that
these values are shared between all geometries in the instance when
the bottom level structure contains more than one geometry. To have
unique data for each geometry, a local root table must be used.
So if I understood that correctly, you either have to use a local root table or you have to restrict yourself to only one geometry per bottom level structure.
There is a MultiplierForGeometryContributionToShaderIndex parameter in TraceRay which you can set to 1 to get a different hit group per geometry. If you store a list of materials per hit group, you probably need only one hit group per geometry.
See also RaytracingMiniEngineSample.