A method for producing an optical waveguide; said method comprising steps of: (a) depositing on a substrate a first composition comprising: (i) a first polysiloxane comprising epoxy groups and alkenyl groups, and having a refractive index no greater than 1.49; (ii) at least one first compound comprising at least two epoxy groups and having molecular weight no greater than 1000 10 -3 kg/mol and a refractive index no greater than 1.49; (iii) a second polysiloxane having a molecular weight from 150 to 1500 10 -3 kg/mol at least one hydrogen atom bonded to a silicon atom and a refractive index of at least 1.50; (iv) at least one photo acid generator; (v) at least one hydrosilylation catalyst, and (vi) at least one inhibitor for hydrosilylation. (b) curing the first composition by exposure to ultraviolet light through a mask to produce a patterned core layer comprising a cured portion of the first composition and an uncured portion of the first composition; (c) removing at least a part of the uncured portion of the first composition to produce a final patterned core layer; (d) after a time from 0.01 to 300 hours, depositing on the final patterned core layer a second composition that has a refractive index at least 0.002 lower than that of the first composition, said second composition comprising: (i) a third polysiloxane comprising epoxy groups, and having a refractive index no greater than 1.49, and (ii) at least one second compound comprising at least two epoxy groups and having molecular weight no greater than 1000 10 -3 kg/mol and a refractive index no greater than 1.49; (iii) at least one alcohol; and (iv) at least one photo acid generator, to produce a composite and (e) curing by exposure to ultraviolet light; and (f) heating at a temperature from 20 to 210°C for 0.1 to 10 hours. (a) depositing on a substrate a first composition comprising: (i) a first polysiloxane comprising epoxy groups and alkenyl groups, and having a refractive index no greater than 1.49; (ii) at least one first compound comprising at least two epoxy groups and having molecular weight no greater than 1000 10 -3 kg/mol and a refractive index no greater than 1.49; (iii) a second polysiloxane having a molecular weight from 150 to 1500 10 -3 kg/mol at least one hydrogen atom bonded to a silicon atom and a refractive index of at least 1.50; (iv) at least one photo acid generator; (v) at least one hydrosilylation catalyst, and (vi) at least one inhibitor for hydrosilylation. (b) curing the first composition by exposure to ultraviolet light through a mask to produce a patterned core layer comprising a cured portion of the first composition and an uncured portion of the first composition; (c) removing at least a part of the uncured portion of the first composition to produce a final patterned core layer; (d) after a time from 0.01 to 300 hours, depositing on the final patterned core layer a second composition that has a refractive index at least 0.002 lower than that of the first composition, said second composition comprising: (i) a third polysiloxane comprising epoxy groups, and having a refractive index no greater than 1.49, and (ii) at least one second compound comprising at least two epoxy groups and having molecular weight no greater than 1000 10 -3 kg/mol and a refractive index no greater than 1.49; (iii) at least one alcohol; and (iv) at least one photo acid generator, to produce a composite and (e) curing by exposure to ultraviolet light; and (f) heating at a temperature from 20 to 210°C for 0.1 to 10 hours. <EOS>