Quantum geometric properties of Bloch wave functions in solids, that is, Berry curvature and the quantum metric, are known to significantly influence the ground- and excited-state behaviour of electrons1-5. The bulk photovoltaic effect (BPVE), a nonlinear phenomenon depending on the polarization of excitation light, is largely governed by the quantum geometric properties in optical transitions6-10. Infrared BPVE has yet to be observed in graphene or moiré systems, although exciting strongly correlated phenomena related to quantum geometry have been reported in this emergent platform11-14. Here we report the observation of tunable mid-infrared BPVE at 5 µm and 7.7 µm in twisted double bilayer graphene (TDBG), arising from the moiré-induced strong symmetry breaking and quantum geometric contribution. The photoresponse depends substantially on the polarization state of the excitation light and is highly tunable by external electric fields. This wide tunability in quantum geometric properties enables us to use a convolutional neural network15,16 to achieve full-Stokes polarimetry together with wavelength detection simultaneously, using only one single TDBG device with a subwavelength footprint of merely 3 × 3 µm2. Our work not only reveals the unique role of moiré engineered quantum geometry in tunable nonlinear light-matter interactions but also identifies a pathway for future intelligent sensing technologies in an extremely compact, on-chip manner.