A class of phosphorus containing polycyclic compounds of general formula I, of general formula I′; or of general formula I″;, wherein B1, B2, R1, R2, R1′;, X1, X2, Y1, Y2, BL1, BL2, Z1, and Z2 are defined herein, that may be useful as modulators of type I interferon production, specifically as STING modulating agents, are provided. Also, provided are use of such compounds.