We demonstrate a monolithic 3D integration of Si-based CMOS logic, resistive random-access memory (RRAM) based computing-in-memory (CIM) and ternary content-addressable memory (TCAM) layers, namely M3D-LIME, to implement one-shot learning. The first layer of Si MOSFETs was designed and fabricated using a standard CMOS process and served as control logic. The second layer of 1 T1R array was fabricated with HfAlOx-based analog RRAM using a low-temperature (≤ 300°C) back-end-of-line (BEOL) process to implement CIM for feature extractions. The third layer of 2T2R-based TCAM was fabricated with carbon nanotube field-effect transistors (CNTFETs) and Ta 2 O 5 -based RRAM to perform template storing and matching. Extensive structural analysis and electrical measurements were carried out to validate the integrity and proper function of the fabricated M3D-LIME chip. As a demonstration, GPU-equivalent classification accuracy up to 97.8% was achieved in the one-shot/few-shot learning task on the Omniglot dataset with 162x lower energy consumption. Our work demonstrates the feasibility and great potential of M3D chips consisted of logic, memory and CIM for emerging applications such as artificial intelligence (AI) and high-performance computing (HPC).