Inspired by the comprehensive observations via high-throughput experimentation, it is envisaged that a new quasi-2D HP matrix deploying benefits of each binary system can be designed via compositional mixing of both RP-and DJ-type 2D HP endmembers (i.e., PEA2PbI4 and BDAPbI4, respectively) in a ternary system. Here, by developing and deploying a gated Gaussian process Bayesian optimization (Gated-GPBO), we navigate chemistry in such intricate and discrete molecular space and identify optimal compositions offering ideal bandgap with minimized phase inhomogeneities and local phase distributions. Indeed, the p-i-n type PVs employing the quasi-2D HP film -tailored by Gated-GPBO -exhibit improved performances than those deduced by grid-search, thus effectively identifying optimal compositions directed to device-applicable films at the low-temperature fabrication process. This clearly shows the powerfulness of the Gated-GPBO for the exploration of complex materials systems. Collectively, this work provides a new research workflow not only uncovering fundamental insights into the complex quasi-2D HP system but also presenting designing principles for bespoke materials design and functionality manipulations towards sustainable applications.