Who and at what point, decides/assigns the 5QI value to data?

Hi all,

Trying to understand that in 5GC which entity, and at what point, decides 5QI value for the given data.

I understand that 5QI indicates Packet Delay requirements, Error Rate requirements, and Priority level information. But my question is more from the system implementation point of view.