Abstract The spin Hall effect of light, i.e., the microscopic and spin-dependent transverse splitting of linearly polarized light into circular polarizations at an optical interface, has been considered as a promising candidate for high-precision measurement when combined with a weak measurement technique. However, in those previous demonstrations, the precision is determined by the interface of interest, hindering its versatility. Here, by leveraging the direct correlation of precision with the spin Hall shift, we propose nanophotonic-assisted approaches to increase the precision of the weak measurement by controlling the spin Hall effect of light at the target interface. The refractive index sensing of an isotropic medium is demonstrated as a proof of concept, in which the precision can be increased, in principle, to infinity by placing an index-below-unity slab in the vicinity of the target interface. Furthermore, a single-layer metasurface comprising two-dimensional subwavelength patterns is introduced as an experimentally favorable platform. This study lays the foundation for nondestructive and high-precision investigation of unknown parameters of interfaces and will find wide sensing applications in material science, medical engineering, and other interdisciplinary fields.