Cortical neurons often respond to identical sensory stimuli with large variability. However, under certain conditions, the same neurons can also respond highly reliably. The circuit mechanisms that contribute to this modulation, and their influence on behavior remains unknown. Here we used novel double transgenic mice, dual-wavelength calcium imaging and temporally selective optical perturbation to identify an inhibitory neural circuit in visual cortex that can modulate the reliability of pyramidal neurons to naturalistic visual stimuli. Our results, supported by computational models, suggest that somatostatin interneurons (SST-INs) increase pyramidal neuron reliability by suppressing parvalbumin interneurons (PV-INs) via the inhibitory SSTàPV circuit. Using a novel movie classification task, we further show that, by reducing variability, activating SST-INs can improve the ability of mice to discriminate between ambiguous stimuli.