Abstract: A sensitive refractive index based detector comprises a first laser cavity (7) and a second laser cavity (7′) each for generating a respective laser light beam. Each laser cavity is defined in a planar waveguide. The surface of the waveguide of the first laser (7) receives a sample to be detected. Light from the two lasers is mixed using a coupling grating (3) and a beat frequency between the lasers dependent upon the refractive index of the substance is measured at a detector (4). Extremely sensitive measurement of small quantities of substance are made possible.