A new version of the weighted averages (WA) algorithm, called generalized WA, is introduced. Generalized WA exhibit a more compact formulation, devoid of iterative and recursive steps, and a wider range of applications. It is more robust, as it provides a unique formulation, valid for real and imaginary parameters. The implementation of the new version is easier and more economical in terms of basic operations. Preliminary numerical examples show the promise of the generalized WA that become the most interesting version in terms of simplicity, robustness and accuracy among the generic class of WA algorithms, which are currently recognized as the most competitive algorithms to evaluate Sommerfeld integral tails.