rating logic documentation