We report a machine learning (ML)-based approach allowing thermoelectric generator (TEG) efficiency evaluation directly from five parameters: two physical properties�carrier density and energy gap, and three engineering parameters�external load resistance, TEG hot side temperature, and leg height. Then, we use a genetic algorithm to optimize these parameters to maximize TEG efficiency. To prepare data, physical properties of n-and p-type materials were computed by coupling Density Functional Theory with Boltzmann Transport and were then used for Finite Elements simulations. TEG efficiency was evaluated using a finite element model that considered design, radiative heat loss, contacts, external load resistance, and combinations of n-and p-type materials, resulting in 5300 different scenarios with corresponding efficiency values. For the ML model, physical properties and engineering parameters were used as input features, excluding thermoelectric coefficients, with TEG efficiency as the target. The model was based on the gradient boosting algorithm, and its performance was evaluated using the coefficient of determination, which reached a value of 0.98 on the test dataset. Feature importance analysis revealed the most crucial features for half-Heusler-based TEG efficiency: carriers density or Fermi level position, indicating the predominant role of the balance between electrical conductivity and the electronic component of thermal conductivity in driving overall TEG module efficiency. Features that were less important but contributed to model performance included energy gap, lattice thermal conductivity, charge carrier relaxation time, and carrier conductivity effective mass. Features with no impact included density of states effective mass, heat capacity, density, relative permittivity, and leg width. The proposed approach can be applied to identify the most important physical properties and their optimal values, as well as to optimize the TEG design and operating conditions to maximize TEG efficiency.