Accuracy of CO 2 measurement is affected by ambient air fluctuations, making the compensation of such variations in drift-like sensor response essential for concentration level assessment. Here, a series of experiments were carried out with a chamberless approach in a nondispersive infrared (NDIR) gas sensor to examine the combined effect of environmental temperature and relative humidity fluctuations on sensor responses at different concentrations of CO 2 . To eliminate the drift-like terms caused by environmental fluctuations, the behavior of the sensor was modeled to include ambient temperature, relative humidity, the measured responses as the inputs, and the concentration level as the output. The sensor was fabricated by a light source with an embedded parabolic reflector, a thermopile detector, and two reflective walls that are exposed to the applicable range of CO 2 gas. The predicted concentration level was determined by analyzing the system and acquiring a heuristic function based on an ensemble regression model. The created model's reliability and sensor's performance were evaluated by the test and validation data, and the respective accuracies of 99.83 and 98.90% demonstrated the model effectiveness. The chamberless structure of the sensor provides reduction in diffusion time, improves the linearity of responses accompanied by eliminating drift-like variation of responses in varying ambient conditions, and prepares the sensor for industrial applications.