In this work, we propose new double-zeta atomic bases for the Li and Be atoms. These were obtained by applying the Hartree-Fock-Gauss generalized simulated annealing (GSA) method-a modified form of the GSA algorithm. The new bases were generated through optimization of the atomic electronic energy functional with regards to the linear combination of atomic orbitals-molecular orbital (LCAO-MO) coefficients, and exponent and contraction coefficients of the primitive Gaussian functions, simultaneously. These new bases were tested by performing calculations of the ground state energy of the Be atom, and the ground state energy and permanent electrical dipole moment of the LiH molecule, using the multi-reference Hartree-Fock (HF) configuration interaction method-a multi-reference method based on multiple HF solutions. In addition, multi-reference HF configuration interaction calculations were performed for the Be atom using the standard double-zeta, triple-zeta and polarized double-zeta bases. With the new double-zeta bases and with reduced multi-reference HF bases, it was possible to obtain lower energies than those obtained with the full configuration interaction calculations using the standard double-zeta bases and dipole moment values in close agreement with experimental values.