How to return a better item class (green, blue, purple) from a EngramEntry construction.

Im trying to create a MOD to return by a “programatic/random chance” some items with of better “item level”

I need help figuring out where and how to to the Graph…Someone please?