Recent artificial intelligence algorithms aided intraoperative decision-making via stimulated Raman histology (SRH) during craniotomy. This study assesses deep learning algorithms for rapid intraoperative diagnosis from SRH images in small stereotactic-guided brain biopsies. It defines a minimum tissue sample size threshold to ensure diagnostic accuracy. A prospective single-center study examined 121 SRH images from 84 patients with unclear intracranial lesions undergoing stereotactic brain biopsy. Unprocessed, label-free samples were imaged using a portable fiber laser Raman scattering microscope. Three deep learning models were tested to (i) identify tumorous/nontumorous tissue as qualitative biopsy control; (ii) subclassify into high-grade glioma (central nervous system World Health Organization grade 4), diffuse low-grade glioma (central nervous system World Health Organization grades 2-3), metastases, lymphoma, or gliosis; and (iii) molecularly subtype IDH and 1p/19q statuses of adult-type diffuse gliomas. Model predictions were evaluated against frozen section analysis and final neuropathologic diagnoses. The first model identified tumorous/nontumorous tissue with 91.7% accuracy. Sample size on slides impacted accuracy in brain tumor subclassification (81.6%, κ = 0.72 frozen section; 73.9%, κ = 0.61 second model), with SRH images being smaller than hematoxylin and eosin images (4.1 ± 2.5 mm2 vs. 16.7 ± 8.2 mm2, P < 0.001). SRH images with more than 140 high-quality patches and a mean squeezed sample of 5.26 mm2 yielded 89.5% accuracy in subclassification and 93.9% in molecular subtyping of adult-type diffuse gliomas. Artificial intelligence-based SRH image analysis is non-inferior to frozen section analysis in detecting and subclassifying brain tumors during small stereotactic-guided biopsies once a critical squeezed sample size is reached. Beyond frozen section analysis, it enables valid molecular glioma subtyping, allowing faster treatment decisions in the future; however, refinement is needed for long-term application.