The owner's manual says my truck has a 5.5 gal DEF tank. I waited until I was down to 1/4 on the gauge, just above the red zone, and added a 2.5 gal box of Blue DEF from Advance Auto. Now the gauge ...
I think the DEF gauge on the RAM HD trucks (4th Gen) is similar to the waste tank indicators on RVs - there are sensors at preset levels and the level is approximate. Hopefully they are more reliable than the RV waste tank sensors though.